Jump to content
Sign in to follow this  

How do i change opt durring and If statement

Recommended Posts


If WinExists("SAP") = 1 then            ;;;;;;;;;;need exact title match opt 3 here.
ElseIf WinExists("[CLASS:SAP_FRONTEND_SESSION]")=1 and winexists( "SAP Easy Access" ) = 0 then   ;;;;;;;;need default match opt 1 here

Probably something simple but I cant figure it out.

What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world.

Share this post

Link to post
Share on other sites

Like this?


Opt("WinTitleMatchMode", 3)
If WinExists ("SAP") Then
    MsgBox (0, "", "Exact Title Match!")
ElseIf WinExists("[CLASS:SAP_FRONTEND_SESSION]") AND (WinExists( "SAP Easy Access" ) = 0) Then
    Opt ("WinTitleMatchMode", 1)
    MsgBox (0, "", "Default")
    MsgBox (0, "", "HMMM!")

Note that Opt returns the PREVIOUS value of the option, so thats useful in functions etc.



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