 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
moogirl
Joined: 07 Jul 2004 Posts: 2
|
Posted: Wed Jul 07, 2004 7:38 pm Post subject: run script again |
|
|
I used the autoscript writer to record mouse clicks.
What I'd like to do is have a script that will click a button in a web based application every 30 minutes (just to keep me from timing out of the app, no activity after 45 mins, you get timed out).
How do I make it run the script every 30 minutes?
This is the code that autoscript writer generated.
WinWait, Siebel Call Center - Microsoft Internet Explorer, Google
IfWinNotActive, Siebel Call Center - Microsoft Internet Explorer, Google, WinActivate, Siebel Call Center - Microsoft Internet Explorer, Google
WinWaitActive, Siebel Call Center - Microsoft Internet Explorer, Google
Loop, 50
MouseClick, left, 898, 300
Sleep, 600000
MouseClick, left, 902, 299
Sleep, 600000
#persistent |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10464
|
Posted: Wed Jul 07, 2004 7:50 pm Post subject: |
|
|
If you ever want to use the script for other things, it's probably best to use a timer (and leave the script always-running):
| Code: | #Persistent
#SingleInstance
SetTimer, KeepAlive, 1800000 ; 30 minutes
Gosub, KeepAlive ; Use this line to do the first click right away.
return
KeepAlive:
IfWinNotExist, Siebel Call Center - Microsoft Internet Explorer, , return
SplashTextOn, , , About to do KeepAlive...
Sleep, 2000
SplashTextOff
WinActivate
WinWaitActive
MouseClick, left, 898, 300
return |
|
|
| Back to top |
|
 |
moogirl
Joined: 07 Jul 2004 Posts: 2
|
Posted: Wed Jul 07, 2004 8:09 pm Post subject: nice |
|
|
Thanks so much!! I think this is going to work
Going to check in an hour to see if I time out.
Thanks for your speedy response!
Best Regards,
Moogirl |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|