Core Function WinWaitNotActive
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> WinWaitNotActive ( <title>, <text>, <timeout> ) </pre> === Description === Waits until the requested window is not active === Parameters === ==== Title ==== The title ...") |
m (1 revision) |
||
(2 intermediate revisions by one user not shown) | |||
Line 35: | Line 35: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
− | if( | + | if(WinWaitNotActive("Untitled", "", 5)) // Wait 5 seconds for the window to close |
{ | { | ||
println("Notepad is not active window"); | println("Notepad is not active window"); |
Latest revision as of 12:37, 14 June 2015
WinWaitNotActive ( <title>, <text>, <timeout> )
Contents |
Description
Waits until the requested window is not active
Parameters
Title
The title of the window.
Text
Optional; The text of the window to read.
Timeout
Optional; Timeout in seconds.
Return Value
Success: Returns 1.
Failure: Returns 0 if timeout occurred.
Remarks
The window is polled every 250 milliseconds or so.
See "WinTitleMatchMode" in Opt.
Example
if(WinWaitNotActive("Untitled", "", 5)) // Wait 5 seconds for the window to close { println("Notepad is not active window"); } else { println("Notepad is the active window"); }