# Problem with IE.au3.

## Recommended Posts

When I'm trying to run a script that includes #include IE.au3 , I get this error.

Line 164 (File "C:\Program Files\AutoIt3\Include\IE.au3"):

Finc_IECreate($s_Url = "about:blank",$f_tryAttach = 0, $f_visible = 1,$f_wait = 1, $f_takeFocus = 1) Error: "While" statement has no matching "Wend" statement." Any help? #### Share this post ##### Link to post ##### Share on other sites You could post the part of your code that you think is causing the trouble for a start. #### Share this post ##### Link to post ##### Share on other sites You could post the part of your code that you think is causing the trouble for a start. Nevermind, I got that working. However, I am once again having trouble with another element - Sleep(2145 + Random(1,2346)) _IELinkClickByText($oIE,$charactername,0,0) Sleep(2145 + Random(1,2346))$level = StringSplit(_IEBodyReadText($oIE),@CR)$level1 = StringSplit($level[2],":")$level2 = $level1[2] - ")" Do$life = StringSplit(_IEBodyReadText($oIE),@Cr)$life2 = StringSplit($life[3],":")$life3 = StringSplit($life2[2],"/") Sleep(50) Until ($life3[1] + " ") = (" " + $life3[2]) Sleep(100 + Random(1,543)) _IELinkClickByText($oIE,"Enter Combat Arena",0,0)

Sleep(2145 + Random(1,2346))

_IELinkClickByText($oIE,"Fight This Opponent",0,0) It logs into my character fine, but then never enters the Combat Arena. What am I doing wrong? Also - the Sleep (2145 + Random(1,2346) will give me a sleep value that's at least 2.145 seconds and then randomly up to 5 seconds, correct? #### Share this post ##### Link to post ##### Share on other sites I have no idea what you are doing wrong, since I don't know the game. Try adding _IELoadWait($oIE) after the click by text... just a wild guess, really...

-edit:-

And yeah, the sleep part seems to do that alright.

Edited by Nahuel

##### Share on other sites

Edit.

Five or six of the links on that page (that do different things when clicked, obviously) have that as the rollover. Edited by Federalist

##### Share on other sites

I don't see any links in the HTML you posted (<a href=). One possibility is taht the Javascript being included is making dynamic changes to the page -- you can't see these with View Source. Another possibility is taht you are being confused by Frames.

In either case, please download and try DebugBar (free- see my sig) to get a view of the dynamically generated HTML and a better understanding of the HTML structure.

Dale

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

Automate input type=file (Related)

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 on other sites

I don't see any links in the HTML you posted (<a href=). One possibility is taht the Javascript being included is making dynamic changes to the page -- you can't see these with View Source. Another possibility is taht you are being confused by Frames.

In either case, please download and try DebugBar (free- see my sig) to get a view of the dynamically generated HTML and a better understanding of the HTML structure.

Dale

Forgive my ignorance, but what exactly should I do with this ?

The HTML it prints out looks the same.

If I drag the little "find element" thing over what I'm trying to use , it says "function anonymous()

{

return doSubmitFunc()

}"

Not sure if I'm clicking the correct thing, however.

Also, when given the "Select a frame to validate" , it only gives me one option, so I'll assume there's only one frame?

And I'm 99.9% sure the javascript is making dynamic changes to the page - what I don't understand is how to make AutoIT cope with this.

txt += '<a href="#" onclick="showArena();return false">Enter Combat Arena</a><br>';

This seems more relevant - it was in the source code for "town.js", one of the scripts on the page.

Edited by Federalist

##### Share on other sites

I think you've not figured DebugBar out yet. You should not see a javascript function as the source for any elkement you can drop the bullseye on. You should see an HTML element.

For example, when I drop it on the final section of code in your last post I see:

<DIV class=codemain><!--ec1-->txt += '&lt;a href="#" onclick="showArena();return false"&gt;Enter Combat Arena&lt;/a&gt;&lt;br&gt;';<!--c2--></DIV>

DebugBar shows you the dynamically generated source by default - you have to work at it to see the original source.

If the DebugBar View Source drop-down shows only one item, then all you have is the main page and no frames.

Dale

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

Automate input type=file (Related)

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 on other sites

I think you've not figured DebugBar out yet. You should not see a javascript function as the source for any elkement you can drop the bullseye on. You should see an HTML element.

For example, when I drop it on the final section of code in your last post I see:

<DIV class=codemain><!--ec1-->txt += '&lt;a href="#" onclick="showArena();return false"&gt;Enter Combat Arena&lt;/a&gt;&lt;br&gt;';<!--c2--></DIV>

DebugBar shows you the dynamically generated source by default - you have to work at it to see the original source.

If the DebugBar View Source drop-down shows only one item, then all you have is the main page and no frames.

Dale

Ah, I see.

When I drop it over the text that I'm tryign to use, I see

<A onclick="showArena();return false" href="http://ladderslasher.d2jsp.org/#">Enter Combat Arena</A>

What do I do from here?

##### Share on other sites

Ah, I see.

When I drop it over the text that I'm tryign to use, I see

<A onclick="showArena();return false" href="http://ladderslasher.d2jsp.org/#">Enter Combat Arena</A>

What do I do from here?

Dale

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

Automate input type=file (Related)

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

## Create an account

Register a new account

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...