General EQWatcher Concepts > Venturing into the Unknown > Miscellaneous
List of commands
clock()
Spawn(string path, string filename)
clock() Command
Gets the number of milliseconds since EQWatcher Advanced was loaded
Return value
signed long value representing the number of milliseconds since EQWatcher Advanced started
Parameters
none
Example
// This example from the combat module of the core script shows how clock() is used to keep track of the "last hit"
trigger("[@trash@] %combatant% slash@es@ @MobName@ for @Damage@ point@s@ of
damage.")
{
signed long mobequal;
LastHit=clock();
mobequal=strcmp(LastMob,MobName);
if(mobequal!=0)
{ // new mob
NewMob(MobName);
}
TotalSlashHits++;
FightTotal+=Damage;
TotalDamage+=Damage;
TotalSlashDamage+=Damage;
FightSlashing+=Damage;
}
Spawn(string path, string filename) Command
Runs another application
Return value
none
Parameters
path
Path relative to the EQWatcher directory, or absolute may be used.
filename
Name of the application's executable ("everquest.exe" for example)
Example
// This example from the winamp module of the core script shows how Spawn can be used to start WinAMP
alias("winamp spawn")
{
Spawn("C:\\program files\\winamp\\","winamp.exe");
}