Regency Posted October 15, 2007 Share Posted October 15, 2007 Is the a way i can repeat this make the noted lines repeat after a certain amount of time? Noted line to the next noted line. And anyway i can make the Crimes section repeat after two min and GTA one after 4min? Or any way to make the script realize what the web page says like if it says "You need to wait" Can i make it realize it needs to wait the amount of time it says? Run("C:\Program Files\Mozilla Firefox\firefox.exe http://www.TheMafiaNetwork.net") AutoItSetOption("WinWaitDelay",250) WinWaitActive ("TheMafiaNetwork - Mozilla Firefox") Sleep(2000) ;Moves and clicks on Accout login. MouseMove(572,334,10) MouseClick("left") Send("Amped") Sleep(1000) ;Moves mouse away for my own cool reasons. MouseMove(741,335) MouseClick("left") Sleep(1000) ;Moves and clicks password login. MouseMove(575,359,10) MouseClick("left") Send("****") Sleep(1000) ;Clicks login MouseMove(597,437,10) MouseClick("left") Sleep(4000) ;Scrolls down so it can click Crimes, and GTA's. MouseClick("left",169,713,33) -----------------MouseClick("left",35,416,2);Crimes Noted line down to other noted line Sleep(1000) MouseClick("left",419,414,1);Sells Pirated Software Sleep(3000) MouseClick("left", 36,430,1);Clicks Gta's Sleep(1000) MouseClick("left",447,413,1);Clicks Residental Area Sleep(900) -------------MouseClick("left",604,541,1); Steals Car Link to comment Share on other sites More sharing options...
Valuater Posted October 15, 2007 Share Posted October 15, 2007 (edited) Maybe... expandcollapse popupRun("C:\Program Files\Mozilla Firefox\firefox.exe [url="[url="http://www"]http://www[/url].TheMafiaNetwork.net%22"]http://www.TheMafiaNetwork.net"[/url]) AutoItSetOption("WinWaitDelay", 250) WinWaitActive("TheMafiaNetwork - Mozilla Firefox") Sleep(2000) ;Moves and clicks on Accout login. MouseMove(572, 334, 10) MouseClick("left") Send("Amped") Sleep(1000) ;Moves mouse away for my own cool reasons. MouseMove(741, 335) MouseClick("left") Sleep(1000) ;Moves and clicks password login. MouseMove(575, 359, 10) MouseClick("left") Send("****") Sleep(1000) ;Clicks login MouseMove(597, 437, 10) MouseClick("left") Sleep(4000) ;Scrolls down so it can click Crimes, and GTA's. MouseClick("left", 169, 713, 33) $begin = "" $begin2 = "" MyFunction() $begin = TimerInit() $begin2 = TimerInit() While 1 Sleep(10) $dif = Int(TimerDiff($begin)/1000) If $dif >= (2 * 60) Then MyFunction() WEnd Func MyFunction() MouseClick("left", 35, 416, 2);Crimes Noted line down to other noted line Sleep(1000) MouseClick("left", 419, 414, 1);Sells Pirated Software Sleep(3000) $dif2 = Int(TimerDiff($begin2)/1000) If $dif2 >= (4 * 60) Then MouseClick("left", 36, 430, 1);Clicks Gta's $begin2 = TimerInit() EndIf Sleep(1000) MouseClick("left", 447, 413, 1);Clicks Residental Area Sleep(900) MouseClick("left", 604, 541, 1); Steals Car EndFunc ;==>MyFunction 8) Edited October 15, 2007 by Valuater Link to comment Share on other sites More sharing options...
Regency Posted October 15, 2007 Author Share Posted October 15, 2007 AGH!!! Thank you so much i was trying to figure it out my self lol and it didnt work out to well.. it just sits there... Wanna see if you can figure it out? Why it just sits there? expandcollapse popupRun("C:\Program Files\Mozilla Firefox\firefox.exe http://www.TheMafiaNetwork.net") AutoItSetOption("WinWaitDelay",250) WinWaitActive ("TheMafiaNetwork - Mozilla Firefox") $Login = 1 $Crimes = 1 $GTA = 1 $CrimesFrequency = 125000 $GTAFrequency = 245000 Func Login() If $Login = 1 Then Sleep(2000) ;Moves and clicks on Accout login. MouseMove(572,334,10) MouseClick("left") Send("Amped") Sleep(1000) ;Moves mouse away for my own cool reasons. MouseMove(741,335) MouseClick("left") Sleep(1000) ;Moves and clicks password login. MouseMove(575,359,10) MouseClick("left") Send("mine") Sleep(1000) ;Clicks login MouseMove(597,437,10) MouseClick("left") Sleep(4000) EndIf EndFunc Func Crimes() If $Crimes = 1 Then ;Scrolls down so it can click Crimes, and GTA's. MouseClick("left",169,713,33) MouseClick("left",35,416,2);Crimes Sleep(1000) MouseClick("left",419,414,1);Sells Pirated Software Sleep(3000) EndIf EndFunc Func GTA() If $GTA = 1 Then MouseClick("left", 36,430,1);Clicks Gta's Sleep(1000) MouseClick("left",447,413,1);Clicks Residental Area Sleep(900) MouseClick("left",604,541,1); Steals Car EndIf EndFunc $timer1 = TimerInIt() $timer2 = Timerinit() While 1 If TimerDiff($timer1) > 125000 Then Crimes() $timer1 = Timerinit() EndIf Wend If TimerDiff($timer2) > 245000 Then GTA() $timer2 = Timerinit() EndIf Sleep (50) Link to comment Share on other sites More sharing options...
Uten Posted October 15, 2007 Share Posted October 15, 2007 Mixing functions and code like that is really not nice toward us old-timers who got a good slapping if we did when we learned to do this stuff.. Does your code ever pass this line: WinWaitActive ("TheMafiaNetwork - Mozilla Firefox") Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Regency Posted October 15, 2007 Author Share Posted October 15, 2007 Mixing functions and code like that is really not nice toward us old-timers who got a good slapping if we did when we learned to do this stuff.. Does your code ever pass this line: WinWaitActive ("TheMafiaNetwork - Mozilla Firefox") No, not in the script case i posted above. but my script that doesnt try and repeat works fine. No, in terms it just sits there.. any fix? And having trouble with the other persons script. It works for the first time it uses the intervals then it just starts to do them over and over and does not use the intervals... Link to comment Share on other sites More sharing options...
Uten Posted October 16, 2007 Share Posted October 16, 2007 If you don't pass that line you newer get a active window (foreground) with that title. So, basically, you have told your script to hang there until you get a active window with that title. The loop code does not look good to me. But that is just a hunch.. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Regency Posted October 16, 2007 Author Share Posted October 16, 2007 If you don't pass that line you newer get a active window (foreground) with that title. So, basically, you have told your script to hang there until you get a active window with that title.The loop code does not look good to me. But that is just a hunch..Thanks lol and i tried taking that section out and still same result... Link to comment Share on other sites More sharing options...
Valuater Posted October 16, 2007 Share Posted October 16, 2007 this re-sets the timer While 1 Sleep(10) $dif = Int(TimerDiff($begin)/1000) If $dif >= (2 * 60) Then MyFunction() $begin = TimerInit() EndIf WEnd 8) 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