poll { <window> ... }
Initiate command polling from a macro.
<window>
Restrict on-screen
input to these window(s). This is known as a "modal" poll. If
omitted, all windows are available for input.
-kb
Permit commands
to be entered from the keyboard. This is the default behavior. Use
-no_kb to disable keyboard command input.
-sub
Include all subwindows of any indicated windows.
When polling is active, command processing within the macro is suspended and commands are subsequently read only from the keyboard (if enabled), visible windows or external events.
Polling can be terminated by the break command, or by the command repoll break when deep down inside a command frame hierarchy.
When input is restricted to one of more windows (a modal poll), polling will be automatically terminated if all these window are deleted. Any top-level windows created during the poll are automatically included in the polling list.
If a window has polling active, then its parent window automatically has polling active.
A window specifically set to have polling active will not have any child windows active unless, either they are specifically indicated, or the -sub switch is present.
Create a window with subwindow.
window parwin = wpanel parwin {
sub1: wpanel { button: 'Child One' }
sub2: wpanel { button: 'Child Two' }
button 'Parent Hit'
}
Enable all windows for input.
poll
Enable one subwindow (and its parent).
poll parwin.sub1
Enable the parent window and both subwindows.
poll parwin.sub1, parwin.sub2
Enable the parent window and both subwindows (an alternative).
poll parwin,-sub
Enable only the parent window (no subwindows).
poll parwin
|
Commands: |