goku200 Posted June 22, 2020 Posted June 22, 2020 Hello I have a script that loops through a button. The button click works fine. However, I have a js dialog box that pops up and it does not click "OK". Any reason why its not working? I can't seem to figure out the problem. My HTML code: <button id="cancel" class="submit button-1" type="button" data-cmsg="Are you wanting to cancel?" value="Submit"> <span>Cancel</span></button> My JavaScript code: var message = $(this.triggeringElement).attr('data-cmsg'); if (message.lenth > 0){ var c = confirm(message); if (c == false) { return false; } } and here is my Autoit Script: $tags = IETagNameGetCollection($oIE,"button") For $tag in $tags $id_value = $tag.id If $id_value = "Cancel" and $tag.InnerText = "Cancel" Then _IEAction ($tag, "click") WinExists("Message from webpage") Send("{Enter}") EndIf Next
Nine Posted June 22, 2020 Posted June 22, 2020 Showing a JS alert is blocking the script. You need to start another script before clicking the button that will perform the closing of the message box. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
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