supadodger 0 Posted August 27, 2010 (edited) im trying to do something like this pseudo code... here is the real code... $text = wingettext ("windowhere") $text = WinGetText ("Export links") $array = StringSplit ($text, @CRLF ,0) now here is where im not sure what code i need... this is the psuedo code... While $array[5] <> "http" Sleep (100) Wend i just need it to sleep until the Export Links window contains HTTP.... Edited August 27, 2010 by supadodger Share this post Link to post Share on other sites
seandisanti 6 Posted August 27, 2010 im trying to do something like this pseudo code... here is the real code... $text = wingettext ("windowhere") $text = WinGetText ("Export links") $array = StringSplit ($text, @CRLF ,0) now here is where im not sure what code i need... this is the psuedo code... While $array[5] <> "http" Sleep (100) Wend i just need it to sleep until the Export Links window contains HTTP.... you're not assigning anything to $array[5] in your loop, so it will never change and if it's not true immediately your exit condition will never be met... if you put the code that comes of your first psuedo code block inside the loop in your second block, AND have it assign $array[5] before entering the loop so that you're not getting a declaration error, you should be alright Share this post Link to post Share on other sites
supadodger 0 Posted August 27, 2010 (edited) you're not assigning anything to $array[5] in your loop, so it will never change and if it's not true immediately your exit condition will never be met... if you put the code that comes of your first psuedo code block inside the loop in your second block, AND have it assign $array[5] before entering the loop so that you're not getting a declaration error, you should be alright so this code will actually work? While $array[5] <> "http" $text = WinGetText ("Export links") $array = StringSplit ($text, @CRLF ,0) Sleep (100) Wend the export window contains a full url not just http... i need it to wait until a link shows up but its going to be different everytime... so i need it to wait until array[5] exists maybe... Edited August 27, 2010 by supadodger Share this post Link to post Share on other sites
supadodger 0 Posted August 27, 2010 so this code will actually work? While $array[5] <> "http" $text = WinGetText ("Export links") $array = StringSplit ($text, @CRLF ,0) Sleep (100) Wend the export window contains a full url not just http... i need it to wait until a link shows up but its going to be different everytime... so i need it to wait until array[5] exists maybe... i figured it out myself... i just waited until the total amount of arrays went up... While $array[0] < 8 $text = WinGetText ("Export links") $array = StringSplit ($text, @CRLF ,0) sLEEP(100) wEND Share this post Link to post Share on other sites