WarrenIndLLC 0 Posted February 10, 2014 Report Share Posted February 10, 2014 Hey guys, I'm currently having a problem with the Loop While function. I've searched the forum and really haven't found anything that could help me with it and this is really the first time I've used Loop While as I've never really needed to until now. What I'm trying to do is upload a file, then it enters the loop while until that file is finished. When the file is finished then it will change increment the variable from 0 to 1, thus breaking out of the Loop While and continuing with the script. Here is the code I have below: set(#SearchPage, 0, "Global") loop while($comparison(#SearchPage, "=", 0)) { if($comparison($contains("Current Directory:", "Current Directory:"), "=", $false)) { then { wait(5) } else { increment(#SearchPage) } } } Now I have an IF statement in the loop while stating is "this text" isn't on the page, then wait for 5 seconds and I believe it continues the loop. But it just seems to hang there so I never get a chance to search for the text and then increment the variable so I can break out of the loop while. Does anyone know what could be the problem? Thanks Quote Link to post Share on other sites
blumi40 222 Posted February 10, 2014 Report Share Posted February 10, 2014 instead using comparsion(contains()) use $exists and marker the needle u search for in the page....by the way your contains is a nice one search for the Words "Current Directory" in the Words "Current Directory" will give allways $true?! or did i miss something?loop while 1=1 :D Quote Link to post Share on other sites
WarrenIndLLC 0 Posted February 10, 2014 Author Report Share Posted February 10, 2014 Thanks for the reply. I got it to work with the $not $exists and then when the file is done uploading it sees the Current Directory text so it's now working perfect. Thanks! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.