TmanMrT Posted November 29, 2007 Share Posted November 29, 2007 I'm need a portion of code that will create a certain given amount of windows (2 in this example) without waiting for them to load, and then wait for each one to load individually. With this code, it should go like this: Create $ie1, no load wait Create $ie2, no load wait LoadWait($ie1) LoadWait($ie2) But for some reason, it doesn't want to recognize the _IELoadWait(Eval("ie" & $n)) at all. I've tried making the "$n" into a string after finding its value... but nothing seems to work. What am i doing wrong? I included my code in case you're a little confused about what i'm trying to do: CODE#include <IE.au3> Global $home = "https://iiod.ssts.com/login.asp?stname=Arizona&disname=Chandler&code=80&selschool=223&submit1=Submit" Global $windows = 2 $n = 1 While $n < Number($windows+1) Assign(String("ie" & $n), _IECreate($home, 0, 1, 0), 1) $n+=1 WEnd $n = 1 While $n < Number($windows+1) _IELoadWait(Eval("ie" & $n)) $n+=1 WEnd Link to comment Share on other sites More sharing options...
Nahuel Posted November 29, 2007 Share Posted November 29, 2007 Ever thought of arrays? Link to comment Share on other sites More sharing options...
DaleHohm Posted November 29, 2007 Share Posted November 29, 2007 (edited) Try this: $n = 1 While $n < Number($windows+1) Assign(String("$ie" & $n), _IECreate($home, 0, 1, 0), 1) $n+=1 WEnd $n = 1 While $n < Number($windows+1) $oTmp = Eval("$ie" & $n) _IELoadWait($oTmp) $n+=1 WEnd Dale P.S. Nahuel's suggestion is a good one Edited November 29, 2007 by DaleHohm 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 Link to comment Share on other sites More sharing options...
TmanMrT Posted November 29, 2007 Author Share Posted November 29, 2007 Try this: $n = 1 While $n < Number($windows+1) Assign(String("$ie" & $n), _IECreate($home, 0, 1, 0), 1) $n+=1 WEnd $n = 1 While $n < Number($windows+1) $oTmp = Eval("$ie" & $n) _IELoadWait($oTmp) $n+=1 WEnd Dale P.S. Nahuel's suggestion is a good one oh! very good idea. that will probably work. thank you! i hadn't considered the fact that you might not be able to evaluate those kinds of things directly. and i might consider arryays too Link to comment Share on other sites More sharing options...
DaleHohm Posted November 29, 2007 Share Posted November 29, 2007 The _IE functions pass objects byRef, so the parameter cannot be an expression. Also note I changed your "ie" to "$ie" in two places.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 Link to comment Share on other sites More sharing options...
TmanMrT Posted November 29, 2007 Author Share Posted November 29, 2007 The _IE functions pass objects byRef, so the parameter cannot be an expression. Also note I changed your "ie" to "$ie" in two places.Daleyep it works like a charm now. thanks! 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