Alvin1111 Posted January 27, 2015 Share Posted January 27, 2015 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 More sharing options...
computergroove Posted January 27, 2015 Share Posted January 27, 2015 Look in the autoit installation directory. There is an info tool that tells you information on running windows control id's and such. Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
Alvin1111 Posted January 28, 2015 Author Share Posted January 28, 2015 (edited) 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 . 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 January 28, 2015 by Alvin1111 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 28, 2015 Moderators Share Posted January 28, 2015 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 More sharing options...
Recommended Posts