start_script(commmand, who, par)
Posted: Wed Jan 31, 2007 5:36 am
start_script(commmand, who, par)
to launch text command and pass parameters?
to launch text command and pass parameters?
Code: Select all
program TextCmd(who, textcmd)
if ( Lower(TypeOf(who) == "array" ) // it's being passed by a Start_Script()
textcmd := who[2];
who := who[1];
endif
...
end programCode: Select all
include "textcmd.inc";
program _TextCmd(who, text)
TextCmd(who,text);
endprogramCode: Select all
function TextCmd(byref who, text)
// Do stuff.
endfunctionCode: Select all
include "textcmd.inc";
program MyProgram(...)
//...
TextCmd(who,text);
//...
endprogramCode: Select all
function LaunchTextCmd(command, byref who, text)
StartScript(command, array{ who, text } );
endfunction
function testTCParms( byref first_parm, byref second_parm )
if( TypeOf(first_parm) == "Array" )
second_parm := first_parm[1];
first_parm := first_parm[2];
endif
endfunctionCode: Select all
include "textcmds.inc";
program TextCmd(who, text)
testTCParms(who,text);
// Do textcmd stuff.
endprogram