Something simple which I ...

Discuss RoboTask here
Post Reply
robotasker
Posts: 3
Joined: Fri Jan 13, 2006 8:08 am

Something simple which I ...

Post by robotasker »

Something simple which I ... cant even get it to work @@
Hello all, umm I was trying to make this program that "auto-reconnect" (so I don't hav to connect manually :P)
the story is......because when i am online....(downloading, surfing, etc) in a certain amount of time(~10mins), my isp will disconnect me and i will have to reconnect and get a new session key to continue.
the way i was thinking to overcome this is to set a cyclic event for 10 mins. Starting by turning on IE, then have to continuesly (a loop)to check for a popup dialog box (if that popup dialog box appears, it means that I am disconnected), then i will hav to do bla bla bla...( I can work on from that point)
 
Well, how do I get the "If then" and etc to work?
 
So the steps are: turn on IE, then looping to check for a dialog box, and if it appears then.........
 
Appreaciate any Help, Thank You
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Something simple which I ...

Post by Oleg »

You detect internet connection in a very complicated manner.

You can use "Connection monitor" event or check connection via "Check Connection" action each 30-60 sec.
Also you may use "Ping Host" action for determining quality of connection.

See small example how to use "ping".
Save text of task to file and use menu "Task | Import" to import into RoboTask

;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|782314203
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task366"
Hide=INTEGER|0
ID=INTEGER|1820826400
Name=STRING|"Ping example"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3

[Actions]
Action1=FOLDER
Action10=FOLDER
Action11=FOLDER
Action12=FOLDER
Action13=FOLDER
Action14=FOLDER
Action15=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_INET_PING"
Enabled=INTEGER|-1
Name=STRING|"Ping robotask.com"
Params=FOLDER

[Actions\Action1\Params]
default=STRING|"-1"
host=STRING|"robotask.com"
timeout=STRING|"10000"
variable=STRING|"PING_TIME"

[Actions\Action10]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"

[Actions\Action11]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Good connection!"""
Params=FOLDER

[Actions\Action11\Params]
icon=STRING|"1"
msg0=STRING|"Good connection!"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action12]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action13]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action14]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action15]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""PING_TIME"""
Params=FOLDER

[Actions\Action15\Params]
varname=STRING|"PING_TIME"

[Actions\Action2]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"1"
value1=STRING|"{ping_time}"
value2=STRING|"-1"

[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Conection is downed!"""
Params=FOLDER

[Actions\Action3\Params]
icon=STRING|"3"
msg0=STRING|"Conection is downed!"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"

[Actions\Action5]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action5\Params]
case=STRING|"0"
operator=STRING|"2"
type=STRING|"1"
value1=STRING|"{ping_time}"
value2=STRING|"5000"

[Actions\Action6]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Bad connection!"""
Params=FOLDER

[Actions\Action6\Params]
icon=STRING|"0"
msg0=STRING|"Bad connection!"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action7]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"

[Actions\Action8]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action8\Params]
case=STRING|"0"
operator=STRING|"2"
type=STRING|"1"
value1=STRING|"{ping_time}"
value2=STRING|"1500"

[Actions\Action9]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Poor connection!"""
Params=FOLDER

[Actions\Action9\Params]
icon=STRING|"0"
msg0=STRING|"Poor connection!"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
robotasker
Posts: 3
Joined: Fri Jan 13, 2006 8:08 am

Something simple which I ...

Post by robotasker »

Cool got it
 
Umm...one more newb question
eg
[Actions\Action11]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Good connection!"""
Params=FOLDER

[Actions\Action11\Params]
icon=STRING|"1"
msg0=STRING|"Good connection!"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
How do it make the popup message to autoclose in like 1 sec of time? Cuz I dunt wanna keep pressing "OK"
 
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Something simple which I ...

Post by Oleg »

It's only an example for demonstration.
If you don't want to see the dialog box with message you can replace dialog with "Log Message" action. In this case the message will be placed into log of task.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Something simple which I ...

Post by Oleg »

Also, you can simply turn off this step or remove it.
robotasker
Posts: 3
Joined: Fri Jan 13, 2006 8:08 am

Something simple which I ...

Post by robotasker »

thx  I turned it off
I will go experiment with rest of the commands now....hehe thx again
Post Reply