GawdMawd Posted July 6, 2014 Share Posted July 6, 2014 Hello i already did some research but i can't find anything to help me any further. I'm trying to send commands to a untitled window. Neither its working with handle nor with the title i was able to change the window to. Also the windowtitle is being reset when i activate the window. What i got so far: #Include <Array.au3> #Include <WinAPIEx.au3> AutoItSetOption("WinTitleMatchMode", 4) Global $handle = _WinAPI_EnumProcessWindows(ProcessExists("notepad.exe")) ; testing script with notepad If IsArray($handle) Then WinSetTitle($handle[1][0], "", "New Window") ControlFocus("New Window", "", "Edit1") ControlSend("New Window", "", "Edit1", "test") EndIf Link to comment Share on other sites More sharing options...
Developers Jos Posted July 6, 2014 Developers Share Posted July 6, 2014 (edited) Your posted script works fine for me so am not sure what your are asking? Also not sure why you rename the title as you can do the Control command with the found handle: #include <Array.au3> #include <WinAPIEx.au3> AutoItSetOption("WinTitleMatchMode", 4) Global $handle = _WinAPI_EnumProcessWindows(ProcessExists("notepad.exe")) ; testing script with notepad If IsArray($handle) Then ;~ WinSetTitle($handle[1][0], "", "New Window") ;~ ControlFocus("New Window", "", "Edit1") ControlSend($handle[1][0], "", "Edit1", "test") EndIf Jos Edited July 6, 2014 by 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...
GawdMawd Posted July 6, 2014 Author Share Posted July 6, 2014 Yes, it works for notepad. I used notepad to test the script, but its not working for the window i want it to work for. I tried it with the handle but nothing happens -> Thats why i tried to rename it and send the command to the new windowtitle It seems like the required window is not accessible :/ Link to comment Share on other sites More sharing options...
Developers Jos Posted July 6, 2014 Developers Share Posted July 6, 2014 ... and you are going to leave us in the dark about what that application is that doesn't work? 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...
GawdMawd Posted July 6, 2014 Author Share Posted July 6, 2014 Its a game called Killing Floor. I just checked and it does not work for other games either. PS I'm not trying to create a bot. It's just that the next round starts automatically after about 30 secs if you tab out of the game and leave it be -> Dead before you can react Link to comment Share on other sites More sharing options...
Developers Jos Posted July 6, 2014 Developers Share Posted July 6, 2014 Its a game called Killing Floor. I just checked and it does not work for other games either. PS I'm not trying to create a bot. It's just that the next round starts automatically after about 30 secs if you tab out of the game and leave it be -> Dead before you can react Not sure if you actually did read our forum rules since you made this comment, but please reread then and let's stick to them ..ok? 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