Contents | < Browse | Browse >
PUTMSG port_description [number1|string1] [number2|string2] ...
* PUTMSG is useful for testing programms which wait for a message,
or to reactivate a task that waits for a message which will never
arrive. PUTMSG sends a message to the given messageport.
* port_description can be given in 5 (!) ways:
- Name of the messageport
- Adress of the messageport
- 3 ways of a task_description, see BREAK . This MUST be a Process
because the process-internal messageport will be used.
* number|string is a longword number or a string. If it is a number,
it will just be added to the message. If it is a string, a
adress pointing to this string will be added to the message.
If number1|string1 was a point (.), the message will be initialized
as an DOS-Packet.
* After sending the message PUTMSG will wait for the reply and show
that reply like GETMSG . Abort waiting with CTRL-C.
WARNING: Your machine might CRASH if you send a message to a
(Process-internal) port that is not waiting for this message.
NOTE: PUTMSG without arguments makes a DisplayBeep (even without a
window) and outputs the internal register value of A5.
eg. putmsg testtask $21fd68 12
putmsg testport "Hello World!"
If you have 2 ZShells, execute in the one with CLI-number 1
"getmsg". Activate the other shell and type
putmsg 1 "like some chatting ?"
The ZShell no. 1 should display that and prompt "reply ?". Answer
"y" and the message goes back again.
Now try "getmsg wurgutz" at one ZShell and "putmsg wurgutz $abcd"
on the other. Do not forget to reply.
* You can use PUTMSG to use the AREXX interface of a programm. This
works with some programms even with OS1.3- and no AREXX-Package.
eg. putmsg showdvi 0 0 0 0 0 "tofront" {gets ShowDVI to front}
Instead of the first 0 you sometimes must write the adress of
this task. If available replace the second 0 with a pointer to
the rexxsyslib.library. The third 0 is called rm_Action. I do not
know what it is for. The fourth and fifth are results, only
interesting in the reply.
eg. putmsg showdvi 0 0 0 0 0 "loadnew tex.dvi"
* Specify a point as first number if you want to send a DOS-Packet.
eg. putmsg DF0 . 0 1023 0 0 -1 {same as LOCK DF0: ON}
If you get $FFFFFFFF as 4th longword, it was successful.
(with OS1.3- you need to use FileSystem instead of DF0)