Jump to content

im getting bad func but why?


 Share

Recommended Posts

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 by BlueForce
Link to comment
Share on other sites

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

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 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

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

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 by BlueForce
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...