From: | Rick Hodger |
Date: | 19 May 2000 at 22:04:09 |
Subject: | Re: D'oh... |
I watched as Tony Rolfe hammered "Re: D'oh..." out on their keyboard...
> On Thu, 18 May 2000 16:25:58 +0100 Rick Hodger said:
>> Um....can someone remind me how you put a string - eg. "testing" - into a
>> variable like "*name.b"?
> Poke.s &variable, "String" (or String$)
> Can't use *Name.b coz you can't have pointer to byte.
> You need to have pointer to Newtype containing byte
Okay, I'll explain what it is. MUI provides built-in functions for ARexx.
But to use it, you need to tell MUI what commands you want to accept. You
do this by using the MUI_Commands structure, which looks like:
Newtype .MUI_Command
*mc_Name.b
*mc_Template.b
mc_Parameters.l
*mc_Hook.b
mc_Reserved.l[5]
End Newtype
I'm using the following code to add an ARexx command:
Dim arexx.MUI_Command(1)
arexx(0)\mc_Name=&msg_connect$,#MC_TEMPLATE_ID,MUIObjLoc(#CONNECT),0
arexx(1)\mc_Name=0,0,0,0
MUISet #APP,#MUIA_Application_Commands,&arexx
The second line, should cause a "connect" command to be created, that when
called will return #CONNECT through the usual MUIEvent/MUIWaitEvent.
However, the list of commands returned by the program, merely contains a
blank line where it should say "CONNECT". Leaving the code out, results in
no blank line...but no command either :/
It's probably something I'm doing wrong...but I just don't know...
PS: You get an MUI applications list of commands by sending a "HELP
RAM:COMMANDS.TXT", it'll create a file, RAM:COMMANDS.TXT containing the
list.
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie