Psilon Posted June 3, 2017 Share Posted June 3, 2017 It's an obvious question, but I can't find anything related in google, only it shows me is EnumChildWindow and others WinAPI functions. I'm writing a simple script that should send escape key to application (sound pretty easy). But here is a problem: I can find a window but when I send a key nothing happens: #include <MsgBoxConstants.au3> $title = "SR2ShipGenerator"; Main() Func Main() Local $hWnd = WinGetHandle("Rangers") If @error Then MsgBox($MB_SYSTEMMODAL, $title, "An error occurred when trying to retrieve the window handle of Space Rangers") Exit Else MsgBox($MB_SYSTEMMODAL, $title, "Space Rangers window found with ID = " & $hWnd) EndIf ControlSend($hWnd, "", "", '{ESC}') EndFunc It seems that I'm wrong with ControlSend part and I should specify some control inside a window, but I don't know its internal structure. Spy++ shows me following: But I can't see internal structure of window (buttons/etc). Thus I cannot debug/analyze what's wrong with my script. Any suggestions? How can I fix this problem? I appreciate any help. Link to comment Share on other sites More sharing options...
Developers Jos Posted June 3, 2017 Developers Share Posted June 3, 2017 @Psilon, Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. (there is also a link in my signature) Please read them now particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts