General EQWatcher Concepts > Venturing into the Unknown  > EQWatcher


List of commands

EQWatcherPath()

EQPath()

Execute(string command)

LoadCommands(string filename)

LoadScript(string filename)

UnloadScript(string filename)


EQWatcherPath() Command

Gets the current EQWatcher path

Return value

string value of the current EQWatcher Path (for example, c:\program files\eqwatcher\)

Parameters

none

Example

// This example retrieves the current value of EQWatcherPath() and uses it to play a sound

function main()
{
  string wavpath;
  wavpath=EQWatcherPath();
  strcat(wavpath,"Sounds\\danger.wav");
  PlayWAVSync(wavpath);
}
 


EQPath() Command

Gets the current EQ directory

Return value

string value of the current EQ Path (for example, c:\program files\everquest\)

Parameters

none

Example

// This example sets a public string to the current EQ path

public string eqpath;
function main()
{
  eqpath=EQPath();
}


Execute(string command) Command

Executes an EQWatcher Advanced command.  The commands are interpreted the same way as any EQWatcher Advanced command, rather than compiled script.  Variables using %% and @@ ARE processed as normal.

Return value

none

Parameters

command

Full command to be executed.

Example

// This example runs a command
function main()
{
  Execute("winamp play 'my song'");
}
 


LoadCommands(string filename) Command

Loads a commands file.  The commands are interpreted the same way as any EQWatcher Advanced command, rather than compiled script.

Return value

none

Parameters

filename

Filename of the commands file to be run.  All paths are relative to the EQWatcher Advanced directory (or absolute paths may be used), and extensions are not automatically added for this function.

Example

// This example runs a commands file. Please note the compiler special characters \\ used to mean
// a single \ for the path name. This is specific to the compiler, and does not need to be used
// when calling aliases (entering EQWatcher Advanced commands)
function main()
{
  LoadCommands("C:\\program files\\eqwatcher advanced\\test.ews");
}
 


LoadScript(string filename) Command

Loads a compiled script into memory for immediate use.  Note that scripts cannot be loaded more than once.

Return value

none

Parameters

filename

Filename of the compiled script to be loaded.  All paths are relative to the EQWatcher Advanced directory (or absolute paths may be used), and extensions are not automatically added for this function.

Example

// This example runs a script file. Please note the compiler special characters \\ used to mean
// a single \ for the path name. This is specific to the compiler, and does not need to be used
// when calling aliases (entering EQWatcher Advanced commands)
function main()
{
  LoadScript("scripts\\test.eac");
}
 


UnloadScript(string filename) Command

Unloads a compiled script from memory.  All triggers, timers, aliases, etc. created by this script at any point are also removed (i.e. means if the core script is loaded, and the trigger adding aliases are used to create triggers, all of those triggers will be removed upon unloading)

Return value

none

Parameters

filename

Filename of the compiled script to be unloaded.  All paths are relative to the EQWatcher Advanced directory (or absolute paths may be used), and extensions are not automatically added for this function.

Example

// This example unloads a script. Please note the compiler special characters \\ used to mean
// a single \ for the path name. This is specific to the compiler, and does not need to be used
// when calling aliases (entering EQWatcher Advanced commands)
function main()
{
  UnloadScript("scripts\\test.eac");
}