Sign in to follow this  
Followers 0
SamiraTjuH

Need some help with ControlSend

3 posts in this topic

Hi guys can some1 plz help me?!

Whats wrong in my script?

My error starts @ Line29 @ the ControlSend...

its works with the normal send, but i want it to run at the background. :(

PS, srry am a newbie @ AutoIt :mellow:

Greetz,

M!M!

Global $Paused
HotKeySet("{PAUSE}", "Pause")
HotKeySet("{ESC}", "Exit")
HotKeySet("{HOME}", "Go")
;;;; Body of program would go here;;;;
while 1
    Sleep (100)
    WEnd
Func Go()
WinActivate("Game Client")
WinWait("Game Client")
$hWnd = WinGetHandle("Game Client")
WinSetState($hWnd),"", @SW_MINIMIZE)
while 1 
ControlSend($hWnd,"","Edit1",("{TAB}")
Sleep($hWnd,"","Edit1",(214)    
ControlSend($hWnd,"","Edit1",("{2}")
Sleep($hWnd,"","Edit1",(283)
ControlSend($hWnd,"","Edit1",("{3}")
Sleep($hWnd,"","Edit1",(351)
ControlSend($hWnd,"","Edit1",("{4}")
Sleep($hWnd,"","Edit1",(198)
ControlSend($hWnd,"","Edit1",("{5}")
Sleep($hWnd,"","Edit1",(437)
ControlSend($hWnd,"","Edit1",("{6}")
Sleep($hWnd,"","Edit1",(162)
WEnd
EndFunc
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('ATACK! OFF',175,3)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Share this post


Link to post
Share on other sites



I'm pretty sure the title isn't "Game Client", make sure it is correct and use WinTitleMatch if you need to.

However the hardest part to find is the controlID for your game, if you are lucky AutoIt Window Info will get it for you but most likely it won't.

Many games also blocks ControlSend and if you use AutoIt Window Info the text you send will appear as "hidden".

Also as far as I know Sleep does NOT have that many parameters...

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