Question

nnCron and nnCron LITE discussion

Question

Postby HONKEYHAMSTER » Sun, 28 Dec 2008, 23:24

Hi everyone,

I am considering purchasing nnron but am wondering if I can do this:

I want to bring up a web page then close it after two minutes one at a time from a list of a thousand domains in sequential order. Is this possible and can anyone tell me how to set this up?

Thanks!
HONKEYHAMSTER
 
Posts: 2
Joined: Sun, 28 Dec 2008, 23:18

Re: Question

Postby Valery_Kondakoff » Mon, 29 Dec 2008, 00:17

Here is a brief task, which uses an example fom help file: http://www.nncron.ru/help/EN/add_info/f ... file_inout .

I have created a text file ( c:\TEMP\nnCron\domains.txt ):
Code: Select all
www.microsoft.com
www.nncron.ru
www.yandex.ru
www.mozilla.org


And added this task to nncron.tab:

Code: Select all
#( test_read_by_line_open_in_browser
NoActive
\ Reading  file domain.txt line by line (in a loop)
\ into array  list-contents
\ and opening domains in Firefox.
\ Lines in file should not be longer then 255 characters.
VARIABLE list-file
CREATE list-contents 258 ALLOT
Action:
    S" c:\TEMP\nnCron\domains.txt" R/O OPEN-FILE-SHARED THROW list-file !
    \ writing the string into the second postion of array list-content
    BEGIN list-contents 1+ 255 list-file @ READ-LINE THROW WHILE
    \ Number of read characters remains on the stack..
    \ We will save it in the first position of array
    \ in order to get a string with a character count
    list-contents C!
   \ open links
    START-APP: c:\Program Files\Firefox\firefox.exe "%list-contents COUNT%"
   \ pause for 20 seconds
   PAUSE: 20000
   \ closing current window (Ctrl-w)
   SEND-KEYS: "^(w)"
    REPEAT
    DROP
    list-file @ CLOSE-FILE DROP
)#
CU
VK
User avatar
Valery_Kondakoff
Site Admin
 
Posts: 769
Joined: Thu, 01 Jul 2004, 20:49
Location: Moscow, Russia

Re: Question

Postby HONKEYHAMSTER » Mon, 29 Dec 2008, 01:40

Thank you so much!

Can you also adjust the speed at which it will open the next domain?

Thanks!
HONKEYHAMSTER
 
Posts: 2
Joined: Sun, 28 Dec 2008, 23:18

Re: Question

Postby Valery_Kondakoff » Mon, 29 Dec 2008, 01:44

Try to do this by yourself. Just change the
Code: Select all
   \ pause for 20 seconds
   PAUSE: 20000
to
Code: Select all
PAUSE: "00:02"


Here are the explanations: http://www.nncron.ru/help/EN/commands/misc.htm#PAUSE
CU
VK
User avatar
Valery_Kondakoff
Site Admin
 
Posts: 769
Joined: Thu, 01 Jul 2004, 20:49
Location: Moscow, Russia


Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 2 guests

cron