SamiraTjuH Posted November 14, 2008 Share Posted November 14, 2008 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 Greetz, M!M! expandcollapse popupGlobal $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 Link to comment Share on other sites More sharing options...
Pain Posted November 15, 2008 Share Posted November 15, 2008 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... Link to comment Share on other sites More sharing options...
Zedna Posted November 15, 2008 Share Posted November 15, 2008 ControlSend($hWnd,"","Edit1","{TAB}") Resources UDF ResourcesEx UDF AutoIt Forum Search 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