tommytx Posted May 5, 2013 Share Posted May 5, 2013 I have built a Gui that downloads a page with a table in it and I want to add a radio box next to each item when it displays. Is there an easy way to do this.. Is this the best way or can it be done on the fly.. right now I wait for it to load then rewrite it ... is there a simpler or easier way? Once the GUI is loaded with the page... Local $sHTML = _IEBodyReadHTML($oIE) $sHTML = $sHTML & "<p><font color=red size=+5>Big RED text!</font>" _IEBodyWriteHTML($oIE, $sHTML) This adds to the end of it and I assume I could do a search and replace something in the table to get radio boxes at the end of each <td> maybe with something line find </tr> replace with <td>radio box</td></tr> any suggestions.. I am probably doing it the hard way.... Thanks... Link to comment Share on other sites More sharing options...
Bert Posted May 5, 2013 Share Posted May 5, 2013 In SciTE look for KODA under the tools menu The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
JohnOne Posted May 5, 2013 Share Posted May 5, 2013 I don't believe you can do it on the fly. Maybe you could hide the control or even gui until the operation is complete though. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
MouseSpotter Posted May 5, 2013 Share Posted May 5, 2013 (edited) I have built a Gui that downloads a page with a table in it and I want to add a radio box next to each item when it displays.Is there an easy way to do this..Is this the best way or can it be done on the fly.. right now I wait for it to load then rewrite it ... is there a simpler or easier way?Once the GUI is loaded with the page...Local $sHTML = _IEBodyReadHTML($oIE)$sHTML = $sHTML & "<p><font color=red size=+5>Big RED text!</font>"_IEBodyWriteHTML($oIE, $sHTML)This adds to the end of it and I assume I could do a search and replace something in the table to get radio boxes at the end of each <td> maybe with something linefind </tr> replace with <td>radio box</td></tr>any suggestions.. I am probably doing it the hard way.... Thanks...Please correct me if I am wring ... I believe what you are trying to do id modify a HTML table to add your own column with a radio button on each row.If I am right - then I think finding each <TR> tag and adding <TR><TD>+code for radio button will do this.You can get a collection of <TR> tags via the UDF. The innerHTML attribute will give you the table cells <TD> ... add your <TD> to this. Edited May 5, 2013 by MouseSpotter Link to comment Share on other sites More sharing options...
mikell Posted May 5, 2013 Share Posted May 5, 2013 Did you try _IEDocInsertHTML() ? Link to comment Share on other sites More sharing options...
tommytx Posted May 6, 2013 Author Share Posted May 6, 2013 (edited) < Local $sHTML = _IEBodyReadHTML($oIE) $sHTML = StringReplace($sHTML, '> <', '>Tom<') _IEDocWriteHTML($oIE, $sHTML) > No have not tried the insertDoc yet.. maybe I will go try that now. The above code works fine but I suppose it is grabbing the body only as it says and when it rewrites all the stuff in the header is gone.. so No css throws it all out of whack.. Maybe if I can figure out the body insert.. it will insert into the existing full page and not lose the header... but mine works half a...ssed... Oh.. if anyone is confused withe the and Tom is that the table in question is already there and blank with the code above so I just replaced it with Tom for testing.. will be simple to replace Tom with a radio code... Is there a command the reads the entire html file and not just the body... Also my Scite Tools does not list a selection for KODA... am I out of date or what. Thanks for the help so far... Edited May 6, 2013 by tommytx Link to comment Share on other sites More sharing options...
JohnOne Posted May 6, 2013 Share Posted May 6, 2013 _IEDocReadHTML() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Bert Posted May 6, 2013 Share Posted May 6, 2013 Is this just for your computer? If yes,If you are using Firefox - you can use an add-on called GreaseMonkey. https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/If you are using Chrome, use tampermonkey: http://tampermonkey.net/You can use the same scripts for both. What they allow you to do is modify a existing webpage on the fly to suit your taste. I use it for my Salesforce stuff to give me extra functionality. There are thousands of scripts available and it is easy to use. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
tommytx Posted May 6, 2013 Author Share Posted May 6, 2013 Did you try _IEDocInsertHTML() ? I just changed it from body to Doc and it worked perfectly.. Thanks Mikell and John 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