Jump to content
Sign in to follow this  
ivan

update cell data in document table (in browser)

Recommended Posts

ivan

I wrote this last night and it works, just wanna share:

this assumes that you retreived an object $oIE for the browser in question and that this object is visible from within the function

Func _HEUpdateCell($pOldData, $pNewData)
   $oTables = _IETableGetCollection ($oIE)
   For $oTable In $oTables
      If IsObj($oTable) Then
         $TRows = $oTable.rows
         For $TRow In $TRows
            If IsObj($TRow) Then
               $TData = $TRow.GetElementsByTagName ("td")
               For $TDatum In $TData
                  If $TDatum.innerHTML == $pOldData Then
                     $TDatum.innerHTML = $pNewData
                  EndIf
               Next
            EndIf
         Next
      EndIf
   Next
EndFunc  ;==>_HEUpdateCell

hope it's useful for someone out there

IVAN

Share this post


Link to post
Share on other sites
DaleHohm

Hi Ivan,

Nice example... you should put things like this in Scripts and Scraps however...

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites
ivan

You are right, but I didn't get a reply on my last 2 contributions on that forum, so I thought people were going see it and therefore use it if posted here.

Dale, please feel free to rename, modify, use or put this in ie.au3 if you wish, that is.

Regards,

IVAN

Edited by ivan

Share this post


Link to post
Share on other sites
jvanegmond

I know it's called Scripts & Scraps, but most people don't respond to quick Scraps. Full fledged programs or library's are the way to 'score' posts :D

Share this post


Link to post
Share on other sites
ivan

I don't think my scripting skills are up to those of people who get their stuff put into the au3 udfs but if a small snippet can simplify the life of others, then it's worth sharing.

There's always the fear of criticism which refrains unskilled people like me to put useful scripts in the forum.

ivan

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.