Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

By default,  Shogun 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.

...

Scroll tablelayout
style
sortDirectionASC
repeatTableHeadersdefault
widths16%, 11%, 13%, 60%
style
sortByColumn1
sortEnabledfalse
cellHighlightingtrue

NameTypeRequiredComments
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)

Flags

None None

Return value

void

Scroll pagebreak

Examples

Code Block
languagetext
// 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

...