Jump to content

No "representation" of a window


Recommended Posts

Hi guys! First of all I am VERY new to autoit, so many things will be wrong. Second, when trying to get the handle or title of a program, I get 0x0000.... for the handle and just blank for the title. How could I identify the program if I  wanted to use the controlsend function to send keystrokes to it while another window is active? Thanks any help is appreciated!

Link to comment
Share on other sites

Thank you sooo much for that info, I knew should've searched harder beforehand in there but I didn't. Although it still doesn't work, and I believe the "text" parameter for control send in responsible. I've tested it with Skype and such and saw that it only worked when I gave it control info, although when using the tool I  am not given the control info. This time I will post my AutoIt v3 Info results below along with my very nooby script I took from the notepad example :P.

EDIT: to make clear, I actually was not able to receive the control info from the program I intended to use it on. There was no text box or buttons and such in the program for when I needed to use autoit on it.

AutoItv3Info:

>>>> Window <<<<
Title: WARFRAME
Class: WarframePublicEvolutionGfxD3D11
Position: -8, -8
Size: 1936, 1056
Style: 0x15CF0000
ExStyle: 0x00000100
Handle: 0x00000000000408E0
 
>>>> Control <<<<
Class:
Instance:
ClassnameNN:
Name:
Advanced (Class):
ID:
Text:
Position:
Size:
ControlClick Coords:
Style:
ExStyle:
Handle:
 
>>>> Mouse <<<<
Position: 746, 586
Cursor ID: 0
Color: 0xFFF9F9
 
>>>> StatusBar <<<<
 
>>>> ToolsBar <<<<
 
>>>> Visible Text <<<<
 
 
>>>> Hidden Text <<<<
 
 
Bad Crappy Code:
#include <WinAPI.au3>

Example()

Func Example()
    ; Wait 10 seconds for the Notepad window to appear.
    Local $hWnd = WinWait("[Class:WarframePublicEvolutionGfxD3D11]", "", 4)

    MsgBox(4096,"",WinGetTitle($hWnd))
    MsgBox(4096,"",_WinAPI_GetClassName($hWnd))
    MsgBox(4096,"",WinGetHandle($hWnd))

    ; Wait for 2 seconds.
    Sleep(1000)

    ; Send a string of text to the edit control of Notepad. The handle returned by WinWait is used for the "title" parameter of ControlSend.
    ControlSend($hWnd, "", "", "x")
EndFunc   ;==>Example
Edited by Alvin1111
Link to comment
Share on other sites

  • Moderators

This is not a gaming automation forum, and you seem to have detoured the forum rules.

We look forward to you returning to the forum when you have something other than gaming on your mind to automate.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...