Instance - nsrosenqvist/quickscript GitHub Wiki
script_dir()
Returns the directory of the current script
return (string) - The directory containing this script that is being run
author: Niklas Rosenqvist
script_name()
Returns the name of the current script
return (string) - Returns the current script's name
author: Niklas Rosenqvist
lock_file()
Returns the name of the lock_file which this script would use
return (string) - The lock file/directory's name
author: Niklas Rosenqvist
lock_script()
Creates the lock dir that would hinder other instances of this script to run
To use a lock script then the function "lock_script" would have to be run at the top of a script and then the lock file would automatically be deleted when the script ends.
return (int) - Returns 0 if a file was successfully created, if it already existed the script would instantly terminate.
author: Niklas Rosenqvist
unlock_script()
Enables the user to unlock the script manually
return (int) - Returns 0 if successful and otherwise non-zero
author: Niklas Rosenqvist
running_instances()
Returns the number of running instances of this script
return (int) - The number of instances
author: Niklas Rosenqvist