Automatic connection to a wifi network

Discuss RoboTask here
Post Reply
nimido
Posts: 3
Joined: Fri Nov 15, 2013 8:26 pm

Automatic connection to a wifi network

Post by nimido »

Hello,

I usually connect to a public wifi network. But this network allows only 30 min of connection. So to extend my internet surf, I change my Mac address every 30 minutes and I reconnect via a web page, fill a form, etc.

So I want to atomatize this process. I read the help resource but cause I'm not so good in english an computer issue, I don't know how to make Robotask perform the following tasks:

1/Connection to the network triggered by Windows detecting it.

2/Open the home page of the network triggered by step 1

3/Open a 2nd web which the link is in the home page and fill a form to connect the internet.

4/ If the connection is done well, after 30 min change my Mac address and wait for Windows detecst the network again.

I don't know if I ask to much but thank you for those who want to help me and sorry for my bad English.
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Automatic connection to a wifi network

Post by Oleg »

I see two separated tasks:
1. Check the connection
2. Change the MAC address.

You can check the connection by two ways
- Ping some public server (see Ping Host action)
- Dowload some page or image from public server (see Download Files action)

Unfortunately there is no standard way to change MAC address. It depend on your hardware and software.
For example my notebook have no standard utilities to change MAC address of WiFi adapter. Driver software hides this property at all. So I need to use some 3-d party utility.
Oleg Yershov
nimido
Posts: 3
Joined: Fri Nov 15, 2013 8:26 pm

Re: Automatic connection to a wifi network

Post by nimido »

Thank you for such a quick answer.

For changing my MAC address I use Technicium MAC address changer, a freeware very efficient and simple.

In the Ping request, the host name is it the name of the network ( In my picture the Network I aim is "WIFI" ) and what is "Asign reply time to variable"?

If the host answer "yes" to the request, could this trigger the open of a web page?

Generally speaking, could a task trigger an other one and could we make this going in a circle?

Thank's again.
Attachments
Sans titre.png
Sans titre.png (56.14 KiB) Viewed 16451 times
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Automatic connection to a wifi network

Post by Oleg »

Host is the address of server or direct IP address of server (not the connection name)
Look at my example (see below).
It should help you to understand how to make execution of some steps by some condition

Save the task of the task into a file and use menu Task->Import to import into RoboTask.

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|317955339
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task845"
Hide=INTEGER|0
ID=INTEGER|1708441467
LogOnAsUser=INTEGER|1
Name=STRING|"Test ping"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create local variable ""TIMEOUT"" with value """""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varkind=STRING|"1"
varname=STRING|"TIMEOUT"

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

[Actions\Action2\Params]
default=STRING|"-1"
host=STRING|"google.com"
timeout=STRING|"5000"
variable=STRING|"TIMEOUT"

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

[Actions\Action3\Params]
case=STRING|"0"
operator=STRING|"3"
type=STRING|"1"
value1=STRING|"{TimeOut}"
value2=STRING|"-1"

[Actions\Action4]
ActionID=STRING|"A_ROBOTASK_ALERT"
Enabled=INTEGER|-1
Name=STRING|"Show Notification"
Params=FOLDER

[Actions\Action4\Params]
defh=STRING|"1"
defw=STRING|"1"
duration=STRING|"5"
height=STRING|"76"
icon=STRING|"3"
kind=STRING|"0"
message=STRING|"Internet connection works!"
position=STRING|"3"
title=STRING|"Connection"
width=STRING|"330"

[Actions\Action5]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""//www.google.com """
Params=FOLDER

[Actions\Action5\Params]
ifnonzero=STRING|"0"
program=STRING|"http://www.google.com"
runas=STRING|"0"
wait=STRING|"0"

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

[Actions\Action7]
ActionID=STRING|"A_ROBOTASK_ALERT"
Enabled=INTEGER|-1
Name=STRING|"Show Notification"
Params=FOLDER

[Actions\Action7\Params]
defh=STRING|"1"
defw=STRING|"1"
duration=STRING|"5"
height=STRING|"76"
icon=STRING|"2"
kind=STRING|"0"
message=STRING|"Internet connection doesn't exist :("
position=STRING|"3"
title=STRING|"Connection"
width=STRING|"330"

[Actions\Action8]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
Oleg Yershov
nimido
Posts: 3
Joined: Fri Nov 15, 2013 8:26 pm

Re: Automatic connection to a wifi network

Post by nimido »

Thank you for all
I understand better the programm now.
Last question: Is it possible that a connection to a network like "WIFI "can be found as an event in the event log?
Post Reply