Zohar Posted December 30, 2014 Share Posted December 30, 2014 (edited) Hi Imagine this scenario: There is a webpage that you did not create, and it is hosted somewhere on the internet. That web page has 1 table, with 1 column and 10 rows. In each row(which is one cell) there is some simple text. The page doesn't do anything, just display these words. Now, I want to add an OnClick event handler for each cell in that table, so when a cell is clicked, then for example a MsgBox will appear, showing the content of the cell. Can I do it with AutoIt? I mean to add this eventhandler to the webpage, without saving it to disk and then editing the file myself.. Thank you Edited December 30, 2014 by Zohar Link to comment Share on other sites More sharing options...
Gianni Posted December 30, 2014 Share Posted December 30, 2014 have a look to the _IEHeadInsertEventScript() function Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 30, 2014 Moderators Share Posted December 30, 2014 ObjEvent Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Zohar Posted January 1, 2015 Author Share Posted January 1, 2015 (edited) Chimp: Thank you, I will check it. SmOke_N: Is what you wrote different than Chimp's method? Edited January 1, 2015 by Zohar Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 1, 2015 Moderators Share Posted January 1, 2015 Yes, he's talking about inserting javascript into the header. You can obviously do that, but still be responsible to manage the code anyway in autoit (I assume that's what you want to do asking here). I'm talking about catching the html events from AutoIt itself. I believe there's an example in help on it, if not, plenty on the forum if you just type in objevent + IE in google. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Zohar Posted January 2, 2015 Author Share Posted January 2, 2015 (edited) I'm talking about catching the html events from AutoIt itself. I believe there's an example in help on it, if not, plenty on the forum if you just type in objevent + IE in google. For some reason I cannot find one, when using google with site:autoitscript.com I did find the example in the help file, it's on the ObjEvent page. From what I see there, ObjEvent can catch events that are related to the IE Browser control (for example ProgressChange), but not events that happen in the webpage that the IE Browser control is running (for example a Button element being clicked..) Am I correct or there's more info regarding it? Edited January 2, 2015 by Zohar Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 2, 2015 Moderators Share Posted January 2, 2015 (edited) Details: UDF Example: Edited January 2, 2015 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Zohar Posted January 2, 2015 Author Share Posted January 2, 2015 Thank you SmOke_N, I viewed it now, but I must admit that because it looks so long, it's a bit intimidating, so I think I will skip this option. I managed to do it via Chimp's method, for a Button element. I will try now to do it for a Table element too.. Thank you both Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 4, 2015 Moderators Share Posted January 4, 2015 Thank you SmOke_N, I viewed it now, but I must admit that because it looks so long, it's a bit intimidating, so I think I will skip this option. Maybe this could help you and others in future endeavors. >HTMLDocumentEvents UDF Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Zohar Posted January 5, 2015 Author Share Posted January 5, 2015 Thank you SmOke_N, I will read it now 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