Sign in to follow this  
Followers 0
13lack13lade

winwait query

2 posts in this topic

#1 ·  Posted (edited)

Hi,

I have a title that contains date and time for example: blahblah 28/09/2017 11:45:35 AM and I have a script that needs to wait till that window is active, then continue else exit 'cannot find window' So wrote this:

$var5 = WinWait("blahblah " & _NowDate() & " " & _NowTime(),40)
if $var5 = 0 then
   msgbox(0,"Window did not appear", "blahblah main window did not appear in time, exiting macro")
   Exit
EndIf

Now i know that "blahblah " + _NowDate() + _NowTime() = should give me the correct result if i am right in thinking that winwait runs the window check every 250ms, however my query just pauses and does nothing, even after 40 seconds it does not time out... ?

Does WinWait re-run the title check and thus updating the NowTime every 250ms? or what is the best way to solve this problem so it will activate the window and also why is the statement not timing out?

I cant use class as : WindowsForms10.Window.8.app.0.30495d1_r32_ad1 sometimes the end bit changes R32 might be R6 etc.

 

Edited by 13lack13lade

Share this post


Link to post
Share on other sites



nevermind found my issue!!!

$var5 = WinWait("blahblah " & _NowDate() & " " & _NowTime(),40)

should be

$var5 = WinWait("blahblah " & _NowDate() & " " & _NowTime(),"",40)

lol... attention to detail people!

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