diikee Posted June 30, 2008 Share Posted June 30, 2008 (edited) <FONT color=#666666><IMG height=1 src="1pixclear.gif" width=4>Done </FONT> #include <IE.au3> #include <File.au3> Opt("WinTextmatchMode", 1) Opt("WinTitleMatchMode",3) $title = _IETagNameGetCollection($oIE, "IMG") for $ti in $title If ($ti.innerText) = "Doing" Then ConsoleWrite("Correct Values" & @CRLF) ElseIf ($ti.innerText) = "Done" Then ConsoleWrite("Incorrect Values" & @CRLF) Else ConsoleWrite("Wrong Model. See you again" & @CRLF) EndIf next Script runs fine but never goes through the Done path and instead executes the Doing path. what am I doing wrong??? Edited June 30, 2008 by diikee Link to comment Share on other sites More sharing options...
Artisan Posted July 1, 2008 Share Posted July 1, 2008 I've not used _IETagNameGetCollection before, but I'll take a stab at it. I'm thinking your For loop should read as 'For $ti in $title.innerText' - and then you use $ti instead of $ti.innerText. My assumption is that $title returns only 1 object, and so the For loop only executes once. To test this, throw in a variable to count the number of loops executed and output that with your ConsoleWrite. Also, try forcing the first run to be "Done" instead of "Doing". That will at least narrow things down for you. Link to comment Share on other sites More sharing options...
FreeFry Posted July 1, 2008 Share Posted July 1, 2008 <FONT color=#666666><IMG height=1 src="1pixclear.gif" width=4>Done </FONT> #include <IE.au3> #include <File.au3> Opt("WinTextmatchMode", 1) Opt("WinTitleMatchMode",3) $title = _IETagNameGetCollection($oIE, "IMG") for $ti in $title If ($ti.innerText) = "Doing" Then ConsoleWrite("Correct Values" & @CRLF) ElseIf ($ti.innerText) = "Done" Then ConsoleWrite("Incorrect Values" & @CRLF) Else ConsoleWrite("Wrong Model. See you again" & @CRLF) EndIf next Script runs fine but never goes through the Done path and instead executes the Doing path. what am I doing wrong??? Can you post your full code please? As far as I can see, you've done nothing wrong in that part of the code.. 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