Sign in to follow this  
Followers 0
contin

Looking for a variable in WinWaitActive

7 posts in this topic

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?

Share this post


Link to post
Share on other sites



WinWaitActive($var & " - Internet Explorer")


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

$var=WinWaitActive("Internet Explorer")

Share this post


Link to post
Share on other sites

Oh yes bigdod had it...

Share this post


Link to post
Share on other sites

$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: ).


[center]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.[/center]

Share this post


Link to post
Share on other sites

Oh yes bigdod had it...

herewasplato was first.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

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  
Followers 0