kevin42036

WinWait for Title with quotes syntax error

4 posts in this topic

Hi All, I am very new to AutoIt and scripting in general and would appreciate any help as I am sure there is a quick fix for this, I am just unable to figure it out.

My window Title is <ARWNLSString nlsTable="ariba.html.procureui" nlsKey="ReviewTitle">Checkout</ARWNLSString> - Internet Explorer

However, when I use WinWait with that title, I get a syntax error. I am assuming this is because my title has quotes embedded in it so it does not know where each quote begins and ends.

WinWait("<ARWNLSString nlsTable="ariba.html.procureui" nlsKey="ReviewTitle">Checkout</ARWNLSString> - Internet Explorer")

Any help advice is very appreciated!

Thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

@kevin42036 welcome to the forum. Try a single quote around the outside:

WinWait('<ARWNLSString nlsTable="ariba.html.procureui" nlsKey="ReviewTitle">Checkout</ARWNLSString> - Internet Explorer')

You can also set the WinTitleMatchMode to 2 (match any substring), and do something like this:

Opt("WinTitleMatchMode", 2)
WinWait("ariba.html.procureui")

 

Edited by JLogan3o13
1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Just use single quotes around your string for example:

' <ARWNLSString nlsTable="ariba.html.procureui" nlsKey="ReviewTitle">Checkout</ARWNLSString> - Internet Explorer'

JLogan3o13 bet me too it :)

 

Edited by Subz
1 person likes this

Share this post


Link to post
Share on other sites

@JLogan3o13 @Subz Really appreciate the help guys! Thanks a bunch

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