mib666007 Posted November 23, 2019 Share Posted November 23, 2019 I'm kinda new to AutoIt but not programming so I apologize in advance for any dumbness but why is this script exiting? Specifically, it will run a while and stop suddenly with a message in the console that reads "Exit code: 0 Time: 43.45". The amount of time it runs seems variable. I have tried running from the SciTE and also run the script outside of it and the same thing happens. expandcollapse popup#include <File.au3> Opt("SendKeyDelay", 500) Opt("SendKeyDownDelay", 300) $hwnd = WinGetHandle("RetroArch Nestopia1.50-WIP 7f48c21") While True ; first check to see if we are on make new game screen WinActivate($hwnd) sleep(2000) $screengraboverall = PixelChecksum(-1327, 52, -260, 860, 1, $hwnd) $preseasonselecttrue = PixelChecksum(-1285, 64, -344, 116, 1, $hwnd) $tecmosportsnewstrue = PixelChecksum(-1139, 60, -551, 112, 1, $hwnd) ;_FileWriteLog(@ScriptDir & "\Example.log", $tecmosportsnewstrue) If $screengraboverall = 514921478 Then send("x") sleep(1000) EndIf If $screengraboverall = 732458330 Then send("{down}") sleep(1000) EndIf If $screengraboverall = 3348524438 Then send("{down}") sleep(1000) EndIf If $screengraboverall = 2961993129 Then send("{down}") sleep(1000) EndIf If $screengraboverall = 2832821635 Then send("{down}") sleep(1000) EndIf If $screengraboverall = 893414804 Then send("{down}") sleep(1000) EndIf If $screengraboverall = 4291259785 Then send("x") sleep(1000) EndIf If $preseasonselecttrue = 478876543 Then ;inside team selection $x = Random(0, 3, 1) $y = Random(0, 7, 1) While $x > 0 send("{right}") sleep(1000) $x = $x - 1 WEnd While $y > 0 send("{down}") sleep(1000) $y = $y - 1 WEnd send("x") sleep(1000) $x = Random(0, 3, 1) $y = Random(0, 7, 1) While $x > 0 send("{right}") sleep(1000) $x = $x - 1 WEnd While $y > 0 send("{down}") sleep(1000) $y = $y - 1 WEnd ; delay and set text for final betting send("x") sleep(1000) EndIf If $tecmosportsnewstrue = 320358972 Then ;halftime , delay and set text send("x") sleep(1000) EndIf WEnd Link to comment Share on other sites More sharing options...
mib666007 Posted November 23, 2019 Author Share Posted November 23, 2019 I've also tried a variety of different whiles such as While 1 instead of While True. Link to comment Share on other sites More sharing options...
mib666007 Posted November 23, 2019 Author Share Posted November 23, 2019 Nevermind. Webroot was killing it... Link to comment Share on other sites More sharing options...
Developers Jos Posted November 23, 2019 Developers Share Posted November 23, 2019 Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team 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