Sign in to follow this  
Followers 0
Andy2520

How to use opt WinTitleMatchMode .

2 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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

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