xtrim Posted February 16, 2013 Posted February 16, 2013 Hi, I wrote a small script that displays a web page within autoit GUI. Is there a way to "catch" the clicks on the links on that web page? The web page is customizable, so I can define the link in any way I want... Tnx
kylomas Posted February 16, 2013 Posted February 16, 2013 xtrim, Yes, read the OBJ/COM Reference section of the help file. There is an example under COM Events that dscribes what you are asking. kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
xtrim Posted February 18, 2013 Author Posted February 18, 2013 Hi kylomas, I tried it and all it return is the action you perform, which is a really good progress by itself But I need it to return the actual link that I click on (it is actually an anchor) - and I have several of them on that page... So,I want to press on a link (or a-look-a-like) on the page,nothing will happen on that page, catch WHAT was pressed and then do something... is it possible? thank you for your help
water Posted February 18, 2013 Posted February 18, 2013 If a user clicks on a link he expects the URL to be opened. Why do you want to intercept and do something else? 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
xtrim Posted February 18, 2013 Author Posted February 18, 2013 (edited) If a user clicks on a link he expects the URL to be opened. Why do you want to intercept and do something else?I use it to display some local html that i dynamically create with another program.I want it to be also dynamic - that means, when i press 'somehing' the original software will know to re-build the html.The user does not know that this is a web page...it is inside the autoit gui, not on a web browser.I use _IECreateEmbedded() Edited February 18, 2013 by xtrim
xtrim Posted February 18, 2013 Author Posted February 18, 2013 Hi,I manage to catch it by using the anchors in the HTML and using the function "IEEvent_BeforeNavigate" that was in the example that kylomas suggested.This way the page does not change and I get the anchor name from the url string.Thank you
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