Jump to content

Find Certain Text Inside of WinGetText...


Recommended Posts

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
Link to comment
Share on other sites

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

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
Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...