-
-
Notifications
You must be signed in to change notification settings - Fork 127
Scripting: SLADE Namespace
The slade scripting namespace contains a set of functions for general interaction with the SLADE application.
Parameters
-
stringmessage: The message to print to the log
Writes a message to the SLADE log.
Example
slade.logMessage('This is a log message')
Returns string
Returns the most recently generated error message
Parameters
-
stringtitle: The dialog caption -
stringmessage: The message to display
Shows a simple message dialog
Parameters
-
stringtitle: The dialog caption -
stringmessage: The message to display -
stringdefaultValue: The initial default value
Returns string
Shows a dialog prompt for the user to enter a string value
Parameters
-
stringtitle: The dialog caption -
stringmessage: The message to display -
numberdefaultValue: The initial default value -
numbermin: The minimum value allowed -
numbermax: The maximum value allowed
Returns number
Shows a dialog prompt for the user to enter a numeric value
Parameters
-
stringtitle: The dialog caption -
stringmessage: The message to display
Returns boolean
Shows a dialog prompt with 'Yes' and 'No' buttons, returning true for yes or false for no
Parameters
-
stringtitle: The dialog caption -
stringextensions: A formatted list of selectable file extensions (see description for format) -
stringfilename: The name of the file to browse for
Returns string
Shows a file browser dialog allowing the user to select a file and returns the full path to the selected file. If no file was selected it will return an empty string.
The extensions parameter must be in the following format:
<Type Name 1>|<Extension 1>|<Type Name 2>|<Extension 2>|...
Where <Type Name X> is the name to display in the type selection dropdown, and <Extension> is the wildcard file extension for that type
Example
local path = slade.browseFile('Select a File', 'Wad Files (*.wad)|*.wad|All Files|*.*', '')
slade.logMessage('Selected file ' .. path)
Parameters
-
stringtitle: The dialog caption -
stringextensions: A formatted list of selectable file extensions
Returns string array
Shows a file browser dialog allowing the user to select multiple files and returns an array of full paths to the selected files. If no file was selected it will return an empty array. See browseFile above for the formatting of the extensions parameter.
Returns Archive
Returns the archive for the currently open tab in the main SLADE window.
Returns ArchiveEntry
Returns the currently open entry in the main SLADE window.
Returns ArchiveEntry array
Returns an array of the currently selected entries in the main SLADE window.
Parameters
-
Archivearchive: The archive to show
Shows the tab for the given archive in the main SLADE window.
Parameters
-
ArchiveEntryentry: The entry to show
Shows the given entry in a tab in the main SLADE window.
Home | Downloads | Tutorials | Wiki Index | SLADE Homepage