AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

run script again

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
moogirl



Joined: 07 Jul 2004
Posts: 2

PostPosted: Wed Jul 07, 2004 7:38 pm    Post subject: run script again Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10464

PostPosted: Wed Jul 07, 2004 7:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
moogirl



Joined: 07 Jul 2004
Posts: 2

PostPosted: Wed Jul 07, 2004 8:09 pm    Post subject: nice Reply with quote

Thanks so much!! I think this is going to work Very Happy

Going to check in an hour to see if I time out.

Thanks for your speedy response!

Best Regards,
Moogirl
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group