destluck Posted August 2, 2013 Share Posted August 2, 2013 Alright so i have this script and when i run its it executes once then stops why is that? while 1 $aPixel = PixelSearch(417, 680, 435, 691, 0xEF4A4A) If IsArray($aPixel) = False Then WinActivate("text") WinWaitActive("text") Local $coord = PixelSearch(354, 238, 457, 339, 0x7B1818) MouseMove($coord[0], $coord[1]) MouseClick("left") EndIf sleep(10) WEnd Link to comment Share on other sites More sharing options...
BrewManNH Posted August 2, 2013 Share Posted August 2, 2013 Stops, or exits? Because if you mean it pauses, it's probably because the WinWaitActive is waiting for the window to appear and be active, and if that doesn't happen it's going to wait forever, or at least until you close the script manually. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
destluck Posted August 2, 2013 Author Share Posted August 2, 2013 nah just exits the script its no more in my tray at the bottom Link to comment Share on other sites More sharing options...
BigDod Posted August 2, 2013 Share Posted August 2, 2013 Perhaps the game you are using it on is closing the script Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
destluck Posted August 2, 2013 Author Share Posted August 2, 2013 well this one works without stopping. but not the other one i posted While 1 $aPixel = PixelSearch(595, 706, 631, 721, 0xC60000) If IsArray($aPixel) = False Then WinActivate("text") WinWaitActive("text") MouseMove(418,290) MouseClick("left") EndIf sleep(10) WEnd Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 2, 2013 Moderators Share Posted August 2, 2013 What game is it for? Some have anti-bot measures in place. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
BigDod Posted August 2, 2013 Share Posted August 2, 2013 What game is it for? Some have anti-bot measures in place. I would guess Ashen Empires Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
destluck Posted August 2, 2013 Author Share Posted August 2, 2013 the second script i posted works fine but not the first. would you guys think i scipted something wrong. the first scriot i posted in the thread executes the script once. and instead of checking again like a infinite loop it just stops Link to comment Share on other sites More sharing options...
Edano Posted August 2, 2013 Share Posted August 2, 2013 no your code is correct and it runs on my machine. does it also stop when your game is not running ? [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
destluck Posted August 2, 2013 Author Share Posted August 2, 2013 it runs fine untill the conditions to enter the IF statement are valid, then it executes the IF statement and then the script stops instead of starting over. is there a alternate way i could make the loop infinite Link to comment Share on other sites More sharing options...
Edano Posted August 2, 2013 Share Posted August 2, 2013 bad luck [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 2, 2013 Moderators Share Posted August 2, 2013 (edited) I would guess Ashen Empires I doubt it, destluck has already been Moderated for game related posts, and told not to start another. I'm sure he's not that stupid So as soon as he tells us what application he's trying to manipulate, we can help Edited August 2, 2013 by JLogan3o13 BigDod 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
destluck Posted August 2, 2013 Author Share Posted August 2, 2013 i know some programmnig languages have Jumpto or call functions does Autoit have em i cant seem to find it. i could just have the script run and then do a call function/jumpto to bring it back to the top of the script Link to comment Share on other sites More sharing options...
Developers Jos Posted August 2, 2013 Developers Share Posted August 2, 2013 (edited) i know some programmnig languages have Jumpto or call functions does Autoit have em i cant seem to find it. i could just have the script run and then do a call function/jumpto to bring it back to the top of the script Nope, try reading some more in the helpfile and doing a little more research before asking.... this is one of those that have been asked many times. Also am wondering how long you think you can ignore people here and still continue to ask questions. Jos Edited August 2, 2013 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
destluck Posted August 2, 2013 Author Share Posted August 2, 2013 what you mean ignore ppl? Link to comment Share on other sites More sharing options...
Developers Jos Posted August 2, 2013 Developers Share Posted August 2, 2013 what you mean ignore ppl? Ok, let me try then: What is the purpose of the script you are creating? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
destluck Posted August 2, 2013 Author Share Posted August 2, 2013 oh that im trying to have a task repeat itself over and over Link to comment Share on other sites More sharing options...
Developers Jos Posted August 2, 2013 Developers Share Posted August 2, 2013 oh that im trying to have a task repeat itself over and over Please do not BS with me, you get one more chance: What are you trying to automate with the initial script posted? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts