Vicon Shogun banner


Adds a script to Shogun's internal list of scripts.

By default, Shogun fills its internal list with all of the hsl files found in the "script directories" you specify in your Preferences. However, if you wish to be able to call a script which isn't under one of those directories, then you must either use the runScript command, or you must add the script to Shogun's internal list of scripts using addScript.

Note that if you wish to call the script from a hot key, then you should use this command rather than runScript.

Also note that if the file name of the script you add conflicts with an existing script or command in Shogun's internal list, then this command will fail. It will also fail if the script does not exist on the file system.

Functional area


Command syntax


addScript "scriptPath"


scriptPathstringyesThe full path of the script to add to Shogun's list of scripts. For paths, use forward-slashes instead of back-slashes (e.g. C:/My Documents/MyScript.hsl)



Return value



// Iterate through all of the scripts in a directory and
// add them to Shogun's list of scripts
string $scripts[] = `getFileList "X:/My/Server/Scripts/" -pattern "*.hsl"`;
int $index, $count;
$count = `getCount $scripts`;
for( $index = 0; $index < $count; $index += 1 )
addScript $scripts[ $index ];

Additional information

Related commands