Sign in to follow this  
Followers 0
Negative1

How do i change opt durring and If statement

2 posts in this topic

opt("wintitlematchmode",3)
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
endif

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?

:D

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")
Else
    MsgBox (0, "", "HMMM!")
EndIf

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

Cheers,

Brett

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