Jump to content

Looking for a variable in WinWaitActive


contin
 Share

Recommended Posts

Alright so I have been trying to find out the correct syntax to search for a varible inside of this command, the variable has been set my inputbox and I have verified that this part is working, so after awhile searching I have been unable to find it. Here is a snipet of the code that I would want to try and fix.

WinWaitActive("$var - Internet Explorer")

However when I do that, it doesn't find it because it is searching for $var - Internet Explorer. When I put double quotes around it so it looks like

(""$var" - Internet Explorer") It generates a error for me. What can I do?

Link to comment
Share on other sites

Alright so I have been trying to find out the correct syntax to search for a varible inside of this command, the variable has been set my inputbox and I have verified that this part is working, so after awhile searching I have been unable to find it. Here is a snipet of the code that I would want to try and fix.

WinWaitActive("$var - Internet Explorer")

However when I do that, it doesn't find it because it is searching for $var - Internet Explorer. When I put double quotes around it so it looks like

(""$var" - Internet Explorer") It generates a error for me. What can I do?

Try

WinWaitActive($var & " - Internet Explorer")

That should do it, I hope.

Edit - Should not answer phone whilst posting.

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

  • Moderators

$var=WinWaitActive("Internet Explorer")

I think he's trying to find the actual title of the window, not just if it has 'Internet Explorer' in the title.

Also, just to add to the array of things here... With Plato's and Dod's post... if you are trying to find the title of the window... if it is not an exact match from the beginning, be sure you use the proper Opt('WinTitleMatchMode', 1/2/3/4) on it (1/2/3/4 is not how it should be btw :lmao: ).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Oh yes bigdod had it...

herewasplato was first.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

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