TobyP Posted November 13, 2020 Share Posted November 13, 2020 Hi This is Day 1 of using AutoIT and I have looked in the forum search but i could not find a generic answer. I have found my control id of "WindowsForms10.Window.8.app.0.ea119_r9_ad1" but I need to know an example code of how I now select that in my script please. I could find a powershell answer but not a generic autoIT command on its own. Thanks Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 13, 2020 Moderators Share Posted November 13, 2020 (edited) @TobyP welcome to the forum. Please take a look at a couple different entries in the help file; both of these have good example scripts that show how you zero in on a window or an element of a window: WinActivate ControlClick If you have additional questions after reading through these help file entries, please feel free to post your code here (even if it is not working as you would like) and we will do our best to assist. Edited November 13, 2020 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
TobyP Posted November 13, 2020 Author Share Posted November 13, 2020 Thanks - just what I needed Link to comment Share on other sites More sharing options...
TobyP Posted November 14, 2020 Author Share Posted November 14, 2020 Slightly different topic but why would the send("key") command not usually work? I had to use the button ID to work on my ControlClick lines. Thanks Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 14, 2020 Moderators Share Posted November 14, 2020 Send is something of a "blind" function, it sends the desired key with no care as to whether it is sending to the window you intend or not. Your target window losing focus is the most common reason you would see this, which is why the Control* commands are always preferable. They will send the command to the specified window and element, whether it has focus or not. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
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