Jump to content
Sign in to follow this  
Guest Py7|-|[]/\/

Func Problem Unknown

Recommended Posts

Guest Py7|-|[]/\/

;Picks up items in MapleStory, activate with the hotkey: Ctrl+z... To terminate the script press: Ctrl+a...
$active = WinActive("MapleStory")

HotKeySet("^z", "Pickup")
HotKeySet("^a", "Terminate")


Func Pickup()
   If $active = 1 then
      While 1
      Sleep(100)
      Send("{z down}")
      Sleep(100)
      Send("{z up}")
   If $active = 0 then
      Exit 0
   EndIf
EndFunc

Func Terminate()
   Exit 0
EndFunc

I haven't used AutoIt in a while. Can someone tell me what's wrong with this? I can't seem to find anything... Also... the error it gives is:

C:\Documents and Settings\Randall Degges\My Documents\Scripts\AutoGrab.au3(47,1) : ERROR: syntax error

EndFunc

Share this post


Link to post
Share on other sites
Valik

Inside the function, you have two If statements, but only one EndIf. I'm thinking the second If should be a single-line statement.

Share this post


Link to post
Share on other sites
Guest Py7|-|[]/\/

Oops... I never even realized I had 2 if statements. Thanks.

Share this post


Link to post
Share on other sites
Guest Py7|-|[]/\/

;Picks up items in MapleStory, activate with the hotkey: Ctrl+z... To terminate the script press: Ctrl+a...
$active = WinActive("MapleStory")

HotKeySet("^z", "Pickup")
HotKeySet("^a", "Terminate")


Func Pickup()
   If $active = 1 then
      While 1
      Sleep(100)
      Send("{z down}")
      Sleep(100)
      Send("{z up}")
   Else
      Exit 0
   EndIf
EndFunc

Func Terminate()
   Exit 0
EndFunc

What's wrong now :)

C:\Documents and Settings\Randall Degges\My Documents\Scripts\AutoGrab.au3(40,4) : ERROR: syntax error

  Else

~~~^

Share this post


Link to post
Share on other sites
Guest Py7|-|[]/\/

Just to let you know. Maple Story has "gayed" me again... The game auto exits if I have a 3rd party program running zZz. What horrible luck.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.