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.
-z
Raise the window's visibility to topmost in the viewing stack. The default
behavior is not to.
When polling is active, command processing within the currently executing 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
a) the child windows are specifically indicated, or
b) the -sub switch is present.
Create a window with subwindows.
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 (2 different methods).
poll parwin.sub1, parwin.sub2 poll parwin,-sub
Enable only the parent window (no subwindows).
poll parwin
Commands: |