roundar Posted May 20, 2012 Posted May 20, 2012 (edited) I'm using software that occasionally pops up an alert titled 'Confirm' with the options 'yes' and 'no.' I want to automatically sent {ENTER} when it pops up, but this does not seem to be doing the trick. What am I missing? Here's the entire script: while 1 While WinExists("Confirm") WinActivate("Confirm") Send("{ENTER}") WEnd WEnd Edited May 20, 2012 by roundar : ([font=courier new,courier,monospace] EndFunc[/font] : )
water Posted May 20, 2012 Posted May 20, 2012 Something like this?While 1 If WinExists("Confirm" Then WinActivate("Confirm") Send("{ENTER}") EndIf Sleep(1000) ; Check is done every second Wend My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
roundar Posted May 21, 2012 Author Posted May 21, 2012 (edited) That wasn't working either. I played around and got it to work by using some of the text in the window. There are no controls for the window itself, only "basic window info." I can't figure out why I can't find the window with the basic info. Edited May 21, 2012 by roundar : ([font=courier new,courier,monospace] EndFunc[/font] : )
roundar Posted May 21, 2012 Author Posted May 21, 2012 I see IfMsgBox in the Notes for users familiar with AutoIt 2.64. Is this an option? : ([font=courier new,courier,monospace] EndFunc[/font] : )
water Posted May 21, 2012 Posted May 21, 2012 That wasn't working either. I played around and got it to work by using some of the text in the window.Does this mean it is working now and you can send ENTER to the window and it closes? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
roundar Posted May 21, 2012 Author Posted May 21, 2012 (edited) Yes. ControlFocus, WinExists, and similar functions were not working with the title alone, I had to include text from the window or control. Also, I don't know why IfMsgBox is listed as a function, but It obviously wasn't what I was looking for. Edited May 21, 2012 by roundar : ([font=courier new,courier,monospace] EndFunc[/font] : )
roundar Posted May 21, 2012 Author Posted May 21, 2012 (edited) oic. Edited May 21, 2012 by roundar : ([font=courier new,courier,monospace] EndFunc[/font] : )
water Posted May 21, 2012 Posted May 21, 2012 Please make sure that you have read the forum rules carefully: "Do not discuss any of the following: Automating games or game servers. ..."The Mods are quite strict with this rules. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
roundar Posted May 21, 2012 Author Posted May 21, 2012 Ohh ok. It's pretty close to automating routine tasks on the computer, but I understand the rule. ty : ([font=courier new,courier,monospace] EndFunc[/font] : )
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