Jump to content

simple bot does not working


Go to solution Solved by Tehran123,

Recommended Posts

  • Solution

Hello!

Today I started to program my first bot with autoit. 
My problem is that the func. _search won´t start after running the program and pressing "+".

HotKeySet ( "{+}","_start" )
HotKeySet ( "{#}","_pause" )
HotKeySet ( "{-}","_exit" )

Global $go = 0

Func _start()
   $go = 1
EndFunc
Func _pause()
   $go = 0
EndFunc
Func _exit()
   Exit
EndFunc

Func _search ()
   MouseClick(MOUSE_CLICK_LEFT, 992, 766, 1, 10)
   MouseClick(MOUSE_CLICK_LEFT, 1221, 982, 1, 10)
   MouseClick(MOUSE_CLICK_LEFT, 1438, 736, 2, 10)
   Send ( "{ENTER}" )
   Send ( "{ENTER}" )
   MouseClick(MOUSE_CLICK_LEFT, 133, 184, 1, 10)
EndFunc

While 1
   If $go = 1 Then
      _search()
   Else
      Sleep (10)
   EndIf
WEnd

 

Where is the problem? The program runs with out any problem..

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