1. You don't need to relay commands through the uplink anymore (as of probably a year ago), you can just use the relay command that is available in sessions.
2. runscript or atoms will work fine, you cannot use the Call command, as it will not be run in the context of a script, and the Call command is not used atomically.
3. You don't need to use the ExecuteAtom command. The atom simply needs to be global in scope.
The following form can be used to make a command called "mycommand", accessible globally (any possible entry point in the session), while the script is running. If the script is not running, the command won't exist.
Code: Select all
atom(global) mycommand(int slots)
{
echo MyCommand running, slots=${slots}
}
In the local session's console, or in the script itself, for example:
mycommand 6
And to relay it from another session or the uplink:
relay is2 mycommand 6
The ExecuteAtom command is there for completeness. You probably wouldnt need to use it unless you wanted to store the name of the command to execute in a variable.
For example:
Code: Select all
variable string somecommand=mycommand
${somecommand} 6
/* The above will not execute as a command, it'll bomb out. */
ExecuteAtom ${somecommand} 6
/* The above works. */
That and it's leftover from when atoms were not automatically available in command form. The following works just as well:
Code: Select all
execute ${somecommand} 6
Execute is the equivalent of "ExecuteAtom" to execute any command. Same thing applies, it's generally only used when you need to store the actual command to execute in a variable.
Hope this covered all the bases for you.