Miranda Posted September 5, 2008 Share Posted September 5, 2008 (edited) Hey there, I've got a small script here: _tip("3") _tip("2") _tip("1") $handle=WinGetHandle("") _tip("3") _tip("2") _tip("1") ControlSend("","",$handle,"{5}") ControlSend("","",$handle,"{5}") ControlSend("","",$handle,"{5}") ControlFocus("","",$handle) Sleep(500) ControlSend("","",$handle,"{5}") _tip("$handle=" & $handle) Func _Tip($i) ToolTip($i) Sleep(1000) ToolTip("") EndFunc ;==>_Tip 5 is never pressed in the game. The handle however works properly, Send()ing directly works aswell. Does anyone have a clue how I could try to fix this? The game in question is EverQuest II btw. Thanks if anyone can, or at least tries to help Kind regards, Miranda Edit: I wanted to add that at the second countdown I switched away from the window, and control send wouldn't work, yet a WinActivate($handle) works. Also if the window has control nothing will be sent... Edited September 5, 2008 by Miranda Link to comment Share on other sites More sharing options...
AwAke Posted September 5, 2008 Share Posted September 5, 2008 (edited) I may be wrong as im quite a newb. But I was looking at how you have your handle set. Wouldnt it be better to have it as. $handle = WinGetHandle("EverQuest II") Or perhaps if EverQuest has a control you can send it with the ControlSend along with the control of the game. As the helpfile shows when regarding 'WinGetHandle'. $handle = WinGetHandle("classname=Notepad", "this one") However I may be wrong in what ive said, if thats the case. Sorry. =] Edited September 5, 2008 by AwAke Link to comment Share on other sites More sharing options...
Miranda Posted September 5, 2008 Author Share Posted September 5, 2008 $handle=WinGetHandle("") gets the currently active's window's handle, so that's not an issue. Also other operations with the windowhandle work fine, such as activating the window, just controlsend wont work. I'd say this was a protective measure from EQ2, if Send() didn't work, but since it works I'm just thinking it's their pisspoor coding messing something up... Does anyone have a workaround? Maybe a different programming language? really all I need to do is send the window keypresses at certain intervals, without it being active however. Link to comment Share on other sites More sharing options...
Miranda Posted September 6, 2008 Author Share Posted September 6, 2008 Anyone? Link to comment Share on other sites More sharing options...
crovex Posted September 11, 2008 Share Posted September 11, 2008 ControlSend($title,"","","0") i use it like this but i face bugs like random holding of shifts,ctrl,alt and unfocuses window. Any1 can enlighten me on this? 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