Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: Wol on January 12, 2003, 02:00:22 PM
-
Hi Guys,
Im trying to control SONGPLAYER from a Blitz Basic program
and having difficulty recovering any messages
from AREXX, here is an example of my buggy code.
FindScreen(0)
Window 1,100,100,400,400,$0008,"TEST",1,1
Use Window(1)
WindowOutput(1)
Port.l=CreateMsgPort("WOL")
msg.l=CreateRexxMsg(Port,"rexx","WOL")
SendRexxCommand msg,"rx ADDRESS
SONGPLAYER.1 GET_STATE",#RXCOMM|#RXFF_RESULT|2 Wait loop
a=RexxEvent(Port)
loop
VWait
If a=0 Then Goto loop
A$=GetResultString(msg)
Print A$
MouseWait
End
This small snippet is just an attempt to get a reply
from AREXX, any help would be welcom...
Shaun..
-
try yahoo's arexx group...
regards sarkis :-D :-D :-D
-
a=RexxEvent(Port)
loop
VWait
If a=0 Then Goto loop
A$=GetResultString(msg)
Print A$
MouseWait
End
erm, try putting the event check inside your loop !
The way you had it, it was continually looping around the Vwait with no chance of detecting any message.
.loop
VWait
If RexxEvent(Port)=0 Then Goto loop
A$=GetResultString(msg)
Print A$
MouseWait
End
Also,make sure to use Blitz`s built in Arexx commands, not the RWE ones from the Blitz Support Suite as they are buggy as hell..