write_to_report()
Write arbitrary text to a popped-up task window.
Syntax
write_to_report(handle,data)
Parameter
Parameter | Definition |
---|---|
| task ID returned by a call to the popup_report() function |
| text to be displayed in the task window |
Description
The write_to_report() function writes arbitrary text to a task window that has been popped up on specified consoles. To pop up a task window, see popup_report().
The write_to_report() function returns one of the following values:
- "1" if the write is successful
- "0" if the write fails
A write fails if all consoles have destroyed the task window thereby removing all the status information about the task. Thus, a subsequent call to popup_report() will pop up again the task window on the consoles.
Example
The following PSL script uses the write_to_report() function to write some text to a popped-up task window:
# Pop up a task window on all consoles that are monitoring the Foobar application
handle = popup_report("My Title","Foobar","","First bit of text\n");
ok = 1;
while (handle && ok) {
sleep(10);
# Pop up the task window on all consoles that have started monitoring the
# Foobar application since the first call above (and previous call below)
handle = popup_report("My Second title","Foobar",handle,"Second bit of text\n");
if (handle) { # the handle is still valid
# Write some text to the task window
write_to_report(handle,"hello world\n");
ok = write_to_report(handle,"goodbye world\n");
}
}
Was this page helpful? Yes No
Submitting...
Thank you
Comments
Log in or register to comment.