Hello,
I’m total beginner, and I’m lost.
How can I write a script that disconnect me from my current Internet connection and reconnect in 5 minutes?
THNX for helping
Hello,
I’m total beginner, and I’m lost.
How can I write a script that disconnect me from my current Internet connection and reconnect in 5 minutes?
THNX for helping
Hi.
A search for “Internet Connect, Airport” yields 20 pages of results, so I’ll narrow things down for you. Besides, I remember reading a similar help request a while back that required a three second delay.
Try this - you’ll need GUI scripting enabled (check “enable assistive devices” in the Universal Access pane of System Preferences.) Post #3 of this thread - http://bbs.applescript.net/viewtopic.php?id=17337 - has a different approach that might work if you are pre-Tiger.
The script could be tweaked a bit to suit your needs - for example, quit Internet Connect during the delay then restart it, turn Airport back on, and quit Internet Connect again - but this will give you a head start. Hope it helps.
tell application "Internet Connect"
activate
tell application "System Events"
tell window 1 of process "Internet Connect"
tell button "Airport" of tool bar 1
click
end tell
tell button "Turn Airport Off"
click
end tell
delay 300--delay in seconds
tell button "Turn AirPort On"
click
end tell
end tell
end tell
end tell
delay 3
tell application "Internet Connect" to quit