v3n0m007308 Posted September 23, 2006 Posted September 23, 2006 Hi folks, first of all: Thanks to Dale for this great udf. I only got one problem, which I appearantly can't solve myself I use the udf, to read the timetable of my school. there are some colspans in the table, so when a lesson takes 3 hours, it is just colspan=3. the point is, when reading this table, it only takes the first part of the cell, the second & third, are kept empty. I already found that this is correct, but it isn't really what I need so basicly my question is: is it possible to clone the content of the leftmost element of the cell, to the colspan parts? sorry if my question isn't clear enough, can't explain it very well I think so when I have 5 td's, and the 3rd one has a colspan of 3, I would like to get this: 1st - hi 2nd - this 3rd - is 4th - a 5th - test $array[0] hi $array[1] this $array[2] is $array[3] is $array[4] is $array[5] a $array[6] test hope this is clear thanks in advance.
DaleHohm Posted September 23, 2006 Posted September 23, 2006 Probably the easiest thing to do would be to clone the logic of _IETableWriteToArray() and modify it to suit your needs in your own function. You'll find conditional statements dealing with COLSPAN cells and it would be pretty simple to change it to copy the first value forward instead of leaving the spanned cells empty. 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
v3n0m007308 Posted September 23, 2006 Author Posted September 23, 2006 Probably the easiest thing to do would be to clone the logic of _IETableWriteToArray() and modify it to suit your needs in your own function.You'll find conditional statements dealing with COLSPAN cells and it would be pretty simple to change it to copy the first value forward instead of leaving the spanned cells empty.Dalethanks for the quick answer I already took a quick look at your function, and I found the word colspan a few times, but I couldn't really find how I could change it.my autoit knowledge is pretty basic, but I'll give it a shot.thanks again.
DaleHohm Posted September 23, 2006 Posted September 23, 2006 thanks for the quick answer I already took a quick look at your function, and I found the word colspan a few times, but I couldn't really find how I could change it. my autoit knowledge is pretty basic, but I'll give it a shot. thanks again. I haven't tested, but you should be able to change this: For $td In $tds $a_TableCells[$col][$row] = $td.innerText $col = $col + $td.colSpan NextoÝ÷ Ù:-+ºÚ"µÍBQÜ ÌÍÝ[ ÌÍÝÂBBQÜ ÌÍÚHHHÈ ÌÍÝÛÛÜ[BBBIÌÍØWÕXPÙ[ÖÉÌÍØÛÛVÉÌÍÜÝ×HH ÌÍÝ[^BBBIÌÍØÛÛH ÌÍØÛÛ ÈBBBS^BS^ 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
v3n0m007308 Posted September 23, 2006 Author Posted September 23, 2006 (edited) I haven't tested, but you should be able to change this: For $td In $tds $a_TableCells[$col][$row] = $td.innerText $col = $col + $td.colSpan NextoÝ÷ Ù:-+ºÚ"µÍBQÜ ÌÍÝ[ ÌÍÝÂBBQÜ ÌÍÚHHHÈ ÌÍÝÛÛÜ[BBBIÌÍØWÕXPÙ[ÖÉÌÍØÛÛVÉÌÍÜÝ×HH ÌÍÝ[^BBBIÌÍØÛÛH ÌÍØÛÛ ÈBBBS^BS^ Dale hmm, doesn't work yet, but my code may be messed up too (the reader itself), so I'm going to try some thing. thnx for the effort !!!!!EDIT!!!! dale, your fix works great thanks man the problem was in my code, I found the bug, now I just have to finish the app, but I think i can do it from now on thanks for your time Edited September 23, 2006 by v3n0m007308
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