DAPrice Posted April 18, 2012 Posted April 18, 2012 Hello everyone, this is my first post on the forums so I hope I am posting in the right place and not doing anything wrong I've been trying to get used to the _IE commands to do things more 'properly' than before when I was using my default browser (firefox) and lots of mouse click and sends. It was all going fine but just now I've hit a problem: There is a picture I would like to click on, and the picture is a link to another webpage. When you click on the picture the website gives you a little "are you sure you wish to navigate away from this page" type message with an 'ok' and a 'cancel' button. Before, when I was using firefox, I was clicking on this picture and then using Send("{ENTER}") to immediately press the ok button. But now when I try to do the same thing in IE the box doesn't go away. I've tried sleep commands before pressing enter, and using control send to the pop-up. I even tried telling it to mouse click on the 'ok' button, but it's as if the script is waiting until I manually deal with the message box before it will even continue the script. Perhaps I am just missing something so I hope someone can help. My code is below if it might help show where I am going wrong: #include <IE.au3> $oIE = _IECreate("about:blank") _IENavigate($oIE, "$url") _IEImgClick($oIE, "$imgtext", "alt", 0, 0) Sleep(5000) Send("{ENTER}") Thank you in advance anyone who can help
water Posted April 18, 2012 Posted April 18, 2012 You will get most help on this forum if you can provide a reproducer script. That means a script that is as small as possible to reproduce the problem and contains all necessary information. At the moment the URL you want to work with is missing. 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
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