Jump to content
Sign in to follow this  
supadodger

Find Certain Text Inside of WinGetText...

Recommended Posts

supadodger

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 by supadodger

Share this post


Link to post
Share on other sites
seandisanti

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

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 by supadodger

Share this post


Link to post
Share on other sites
supadodger

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.