BitByteBit Posted September 30, 2009 Share Posted September 30, 2009 $Time = 7440000 Func AutoIt() While 1 Plant() Sleep($Time) if WinExists("Adobe Flash Player") Then Harvest() Plow() Else Login() Harvest() Sleep(180000) Plow() Sleep(180000) EndIf WEnd EndFunc Would I be able to display the remaining amount of time of $Time (In Minutes) at a keypress without exiting the function? Link to comment Share on other sites More sharing options...
monoceres Posted September 30, 2009 Share Posted September 30, 2009 You need to divide those huge sleep's into smaller ones (and loop them) and use TimerInit() and TimerDiff() to determine how long time has passed / is left. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
BitByteBit Posted September 30, 2009 Author Share Posted September 30, 2009 Ok so: $Time = $Time / 60000 Now I have the time in minutes right? Where would I do that calculation? I'm not fussed about the sleeps used later. . . Just $Time. I kinda know how to use TimerInit() $Time = 7440000 Func AutoIt() While 1 Plant() Local $Start = _Timer_Init() ToolTip(_Timer_Diff($Start)) Sleep($Time) if WinExists("Adobe Flash Player") Then Harvest() Plow() Else Login() Harvest() Sleep(180000) Plow() Sleep(180000) EndIf WEnd EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now