13lack13lade Posted September 28, 2017 Share Posted September 28, 2017 (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 September 28, 2017 by 13lack13lade Link to comment Share on other sites More sharing options...
13lack13lade Posted September 28, 2017 Author Share Posted September 28, 2017 nevermind found my issue!!! $var5 = WinWait("blahblah " & _NowDate() & " " & _NowTime(),40) should be $var5 = WinWait("blahblah " & _NowDate() & " " & _NowTime(),"",40) lol... attention to detail people! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now