ajdicky Posted March 27, 2008 Posted March 27, 2008 (edited) $DWLUMBER = _IEAttach("Lumber Mill")$DWSTARTLUMBER = "We need some spare people around here"$oLinks = _IELinkGetCollection($DWLUMBER)For $oLink in $oLinks $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $DWSTARTLUMBER) Then _IEAction($oLink, "click") ExitLoop EndIfNextCould anyone please tell me whats does this line mean?For $oLink in $oLinksand what is $oLink in $oLinks?cause sometimes i try to make another same loop on the same script and change $oLink in $oLinks to another name like $oAink in $oAinks and it pops up error saying thisFor $oLink in $oLinksFor $oLink in $oLinks^ ERRORError: Variable must be of type "Object". Edited March 27, 2008 by ajdicky
weaponx Posted March 27, 2008 Posted March 27, 2008 Why would you make a duplicate topic? Did you think we missed the first one? That is the fastest way to NOT get help.http://www.autoitscript.com/forum/index.php?showtopic=67258
ajdicky Posted March 27, 2008 Author Posted March 27, 2008 (edited) I'm Sorry but its a same topic but not a same question! Edited March 27, 2008 by ajdicky
weaponx Posted March 27, 2008 Posted March 27, 2008 (edited) You need error checking after _IEAttach to ensure that it is successful. $DWLUMBER = _IEAttach("Lumber Mill") If @ERROR Then MsgBox(0,"","Failed to attach to Internet Explorer window") Exit EndIf $DWSTARTLUMBER = "We need some spare people around here" $oLinks = _IELinkGetCollection($DWLUMBER) If @ERROR Then MsgBox(0,"","Failed to attach to retrieve link collection") Exit EndIf For $oLink in $oLinks $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $DWSTARTLUMBER) Then _IEAction($oLink, "click") ExitLoop EndIf Next Edited March 27, 2008 by weaponx
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