Jump to content

If $var = READY Then


Recommended Posts

hi

I have the following hurdle:

my script should proceed when the statusbar of my IE contains READY!

I don't have problems with IF THEN theory, my problem is the comparison.

In other words, I don't know how to implement -->

If $var = READY Then (READY is the text in the statusbar)

I hope you know what's my problem bcs my English is not the best.

regards and thx for your support ...

umek

Link to comment
Share on other sites

You have 2 problems:

  • You don't save the status bar text
  • You don't test it against a string (there is no string in your example code)
Use StatusbarGetText to store the text to a variable, and wrap the message you want to test around quotes like you would for strings.

[Edit] If you don't need the status bar text later on in your script, you don't even need a variable:

If StatusbarGetText() = "my status bar text" Then do_something()
Edited by pekster

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

Thanks for your fast support, both methods of resolutions where very useful.

My problems are solved so far ... ;-)

Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe", "", @SW_MAXIMIZE)

WinWaitActive("Google")

$var=StatusbarGetText("Google")

If $var == "Ready" Then

MsgBox(0, "Nfo", "It works!", 5)

EndIf

That's not the aim of my script ... only an example.

rgds umek

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...