Jump to content

How to use opt WinTitleMatchMode .


 Share

Recommended Posts

Dear Team,

I need small help,

we have to  wait to wait till partial title window appear then process for the next  .

i have used Opt('WinTitleMatchMode', 2) but no luck .. Please help me

Find the below code  : if any one has any optimize code please suggest the same

sleep(4000)
Opt('WinTitleMatchMode', 2)
Global $Win = 'Design - IBM Notes', $GetTitle
$GetTitle = WinGetTitle($Win)
If WinWaitActive($Win) Then
WinClose($Win)
MsgBox(64, 'Info',"Window created")
else
   MsgBox(64, 'Info',"Window not created")
   EndIf
Sleep(10)
Edited by Aniiii
Link to comment
Share on other sites

Try this (untested):

sleep(4000)
Opt('WinTitleMatchMode', 2)
$winGetTitle = WinGetTitle('Design - IBM Notes') ; this title also may need some tweaking
WinWaitActive($winGetTitle)   ; this may cause problems | replace with a sleep()
If WinExists($winGetTitle) Then
WinClose($winGetTitle)
MsgBox(64, 'Info',"Window created")
else
   MsgBox(64, 'Info',"Window not created")
   EndIf
Sleep(10)

Bill

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