Jump to content
Sign in to follow this  
GawdMawd

ControlSend to untitled window

Recommended Posts

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

Share this post


Link to post
Share on other sites

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 by Jos

Share this post


Link to post
Share on other sites

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 :/

Share this post


Link to post
Share on other sites

... and you are going to leave us in the dark about what that application is that doesn't work? :)

Share this post


Link to post
Share on other sites

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 :thumbsup:

Share this post


Link to post
Share on other sites

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 :thumbsup:

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

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...