Working with externals question

Mark Wieder mwieder at ahsoftware.net
Tue Jan 20 20:24:58 EST 2004


Bojsza-

Tuesday, January 20, 2004, 2:01:51 PM, you wrote:

B> Should I be setting this as a command or a function in the external?

If trigger returns text to you and you want to handle it in Transcript
then you'll need this to be an XFCN. Package the return text using the
istrdup() function and return it in retstring. If you don't need to
return text to Transcript then you can get by with an XCMD.

B> Is there a particular format I should use for passing the parameters?

you can recover the parameters from the args[] array. In your example
you'd find

args[0] = "-F"
args[1] = "test.cfg"
args[2] = "-r"
args[3] = "data.04"

(unless you're passing "trigger" itself as a parameter, of course.

B> Is the a way to tell if the external knows the existence of the 
B> function or command?

put the externalCommands of this stack
put the externalFunctions of this stack

-- 
-Mark Wieder
 mwieder at ahsoftware.net



More information about the use-livecode mailing list