BlueForce Posted November 28, 2004 Share Posted November 28, 2004 (edited) i have this code and it keeps giving me Bad Func format. can anyone tell me what's wrong? thanks HotKeySet ("^!c", "Exit") While 1 = 1 ;bottom right car MouseMove (759, 807, 0) MouseClick ("left") ;bottom right guy MouseMove (731, 830, 0) MouseClick ("left") ;top MouseMove (535, 533, 0) MouseClick ("left") ;building top MouseMove (414, 557, 0) MouseClick ("left") ;pillars MouseMove (691, 684, 0) MouseClick ("left") ;left car MouseMove (456, 734, 0) MouseClick ("left") Wend Func Exit () Exit EndFunc Edited November 29, 2004 by BlueForce Link to comment Share on other sites More sharing options...
CyberSlug Posted November 29, 2004 Share Posted November 29, 2004 Exit is a reserved keyword.... Try a different function name: HotKeySet ("^!c", "Terminate") ; ..... Func Terminate() Exit EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
BlueForce Posted November 29, 2004 Author Share Posted November 29, 2004 well i had a nice little thing there. after i ran the program, i pressed ctrl+alt+c and it didn't stop it. so i had to manually restart my computer with the button to turn it off :\ anyways any idea's on why it's not exiting? and is there a default exit sequence for autoit that works for all programs/scripts that you make? Link to comment Share on other sites More sharing options...
t0ddie Posted November 29, 2004 Share Posted November 29, 2004 (edited) for some reason i have had similar trouble with the hotkeys. keep it simple use "{ESC}" instead of "^!c" EDIT: also increase the sleep time, or add a message box until you know it works or you wont be able to stop it (mouse pointer moving around too fast) and you will have to kill the power again lol (like me more than once) EDIT2: oh yeah, you dont HAVE any sleep time in there lol make it sleep for about 5 seconds in between clicks, so you have time to right click the icon and select exit, or put a msgbox after the first mouseclick then while thats up, try to use the hotkey Edited November 29, 2004 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
BlueForce Posted November 29, 2004 Author Share Posted November 29, 2004 (edited) hmmm.. interesting ill give that a try. yay the escape button has worked. thanks Edited November 29, 2004 by BlueForce Link to comment Share on other sites More sharing options...
t0ddie Posted November 29, 2004 Share Posted November 29, 2004 np. just remember before you finish writing a script that you cant close, to put safeguards in it or you will have to turn your computer off, such as message boxes, or make it sleep long enough to actually stop it via task manager or icon Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
BlueForce Posted November 29, 2004 Author Share Posted November 29, 2004 (edited) i would like to make some improvements to my script. but im not sure how, i did look at help but i didnt really understand what it was trying to tell me. anyways i want to make it so it only left clicks if there is white or black underneath the mouse pointer. how would i go about doing this? i know black is 0x000000 and white is 0xffffff small part of my current code: ;bottom right car Sleep (30) MouseMove (759, 807, 0) MouseClick ("left") Edited November 29, 2004 by BlueForce 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