jsteng Posted December 30, 2018 Posted December 30, 2018 using this example script as reference: #include <MsgBoxConstants.au3> Example() Func Example() ; Run Notepad Run("notepad.exe") ; Wait 10 seconds for the Notepad window to appear. Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) ; Set the edit control in Notepad with some text. The handle returned by WinWait is used for the "title" parameter of ControlSetText. ControlSetText($hWnd, "", "Edit1", "This is some text") ; Retrieve the text of the edit control in Notepad. The handle returned by WinWait is used for the "title" parameter of ControlGetText. Local $sText = ControlGetText($hWnd, "", "Edit1") ; Display the text of the edit control. MsgBox($MB_SYSTEMMODAL, "", "The text in Edit1 is: " & $sText) ; Close the Notepad window using the handle returned by WinWait. WinClose($hWnd) EndFunc ;==>Example How do I know "Edit1" is a controlID from Notepad? What are the other controlID used by Notepad? To be more specific, How do I get to know controlID used by a specified window handle from WinList()? I hope I expressed my question properly. many thanks.
jsteng Posted December 30, 2018 Author Posted December 30, 2018 At the meantime, I am looking at an old thread: wonder if this is what I need
TheXman Posted December 30, 2018 Posted December 30, 2018 (edited) @jsteng The full SCITE editor for AutoIt, as opposed to the Lite version that comes with the AutoIt installer, comes with a set of tools. One of those tools is AU3Info. It is very helpful in showing the information you are after. Here's where the full editor can be downloaded: https://www.autoitscript.com/site/autoit-script-editor/downloads/ And the screen shot below shows where the tools can be found in the editor: Once Au3Info is running, just drag the Finder Tool over the window or control of interest to see all of the related info, Edited December 31, 2018 by TheXman Xandy 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now