Jump to content
Sign in to follow this  
lilandywandy

How can i do this >.>

Recommended Posts

lilandywandy

HotKeySet("{PAUSE}", "mExit")

MouseClick("left", 551, 23, 1)

$AfterHours = 3

$FinishTime = String(@Hour + $AfterHours) & ":" & @MIN

Do

Send("{F2}")

Sleep(1080000)

Send("{F2}")

Sleep(1080000)

Send("{F2}")

Until $FinishTime = @Hour & ":" & @MIN

Func mExit()

Exit

EndFunc

Shutdown (1)

-------------------------------

this isnt doing what i really want it to do....

all i want is a program that press f2 every 18 minutes and keeps doing that for 3 hours and then after 3 hours shutdown computer

Share this post


Link to post
Share on other sites
Jos

Untested but should be close:

HotKeySet("{PAUSE}", "mExit")
MouseClick("left", 551, 23, 1)
$AfterHours = 3
$start = TimerInit()
While TimerDiff($Start) < $AfterHours * 60 * 60 * 1000
    Send("{F2}")
    Sleep(18 * 60 * 1000)
WEnd
Shutdown(1)
;
Func mExit()
    Exit
EndFunc  ;==>mExit

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
bshoenhair

Try every 15min with this

HotKeySet("{PAUSE}", "mExit")

MouseClick("left", 551, 23, 1)

For &i = 1 to 12
   Send("{F2}")
   Sleep(900000)
Next

Shutdown (1)

Func mExit()
   Exit
EndFunc
Edited by bshoenhair

Share this post


Link to post
Share on other sites
lilandywandy

k thnx for the responses ill test em out =D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×