supadodger Posted August 27, 2010 Share 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 Link to comment Share on other sites More sharing options...
seandisanti Posted August 27, 2010 Share 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 Link to comment Share on other sites More sharing options...
supadodger Posted August 27, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
supadodger Posted August 27, 2010 Author Share 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 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