AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WinWait: Seconds as an expression

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Karnin



Joined: 13 Feb 2005
Posts: 3

PostPosted: Tue Feb 22, 2005 5:08 pm    Post subject: WinWait: Seconds as an expression Reply with quote

There is a script running containing the following orders:

WinWait, Hinweis, , 1
if ErrorLevel <> 0
GoTo, Weiter
else
WinClose ; Hinweis schließen.
Weiter:

WinWait will wait for one second.

If rewriting the script to

WinWait, Hinweis, , (1/2)

will it wait for only a half second? How to set this to a half second (500ms)?

Thx, Karnin
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Tue Feb 22, 2005 5:40 pm    Post subject: Reply with quote

Sleep, 500
IfWinActive, Hinweis schließen
WinClose ; Hinweis schließen

und weiter gehts ..., oder eleganter mit SetTimer Very Happy
Back to top
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Tue Feb 22, 2005 5:54 pm    Post subject: Reply with quote

From the docs:
Quote:
How many seconds to wait before timing out and setting ErrorLevel to 1. Leave blank to wait indefinitely. Specifying 0 is the same as specifying 0.5. This parameter can be an expression


Thus, these are all the same:

WinWait, Hinweis,, 0
WinWait, Hinweis,, 0.5
WinWait, Hinweis,, (1/2)
WinWait, Hinweis,, (100 - (99 + (1/2)))
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group