Post PowerScript function
Description
Adds a message to the message queue for a window, either a
PowerBuilder window or window of another application.
Syntax
1 |
<span>Post</span> ( <span>handle</span>, <span>message</span>#, <span>word</span>, <span>long</span> ) |
Argument |
Description |
---|---|
handle |
A long whose value is the system handle |
message# |
An UnsignedInteger whose value is the |
word |
A long whose value is the integer value |
long |
The long value of the message or a string. |
Return Values
Boolean. If any argument’s value
is null, Post returns null.
Usage
Use Post or Send when
you want to trigger system events that are not PowerBuilder-defined
events. Post is asynchronous; it adds a message
to the end of the window’s message queue. Send is
synchronous; its message triggers an event immediately.
To obtain the handle of a PowerBuilder window, use the Handle function.
To trigger PowerBuilder events, use TriggerEvent or PostEvent.
These functions run the script associated with the event. They are
easier to code and bypass the messaging queue.
When you specify a string for long, Post stores
a copy of the string and passes a pointer to it.
Examples
This statement scrolls the window w_date down
one page after all the previous messages in the message queue for
the window have been processed:
1 |
<span>Post</span>(Handle(w_date), 277, 3, 0) |