How many bands the equalizer is configured to use - Usage: equalizer.GetNumBands();
Return value: The number of bands in the current configuration
</item>
<item name="SetNumBands">
Set the number of bands the equalizer is configured to use. - Usage: equalizer.SetNumBands(num);
num The number of bands to use - between 1 and 200.
</item>
<item name="GetEQData">
Retrieve the current EQ gain settings. - Usage: equalizer.GetEQData();
Return value: An array of gain values, the length of which is the number of bands.
</item>
<item name="SetEQData">
Set the equalizer gain settings. - Usage: equalizer.SetEQData(banddata);
banddata An array of gain data, one value for each equalizer band.
</item>
<item name="GetBandGain">
Get the gain for one frequency band. - Usage: equalizer.GetBandGain(band);
band Which frequency band to query the gain of.
Return value: The gain for that equalizer band
</item>
<item name="SetBandGain">
Set the gain for one frequency band. - Usage: equalizer.SetBandGain(band, gain);
band Which frequency band to query the gain of.
gain The gain to set it to..
</item>
<item name="RegisterChangeCallback">
Register for callback whenever EQ information changes. - Usage: equalizer.RegisterChangeCallback(name, script, context);
name The name of the callback, for future reference.
script The script to call when eq information has changed. It will be passed a single parameter, boolean in value, which tells whether the number of bands has changed.
context Optional: The object that the script should be run from. Default: The equalizer
Return value: 'registered' if success.
</item>
<item name="UnregisterChangeCallback">
Unregister a previously registered callback. - Usage: equalizer.UnregisterChangeCallback(name, context);
name The name of the callback to unregister.
context Optional: The object that the script is associated with. Default: The equalizer
Return value: 'unregistered' if success.
</item>
<item name="Reset">
Reset the equalizer to flat (no equalization). - Usage: equalizer.Reset();
</item>
</section>
<section name="pab">
<item name="GetPitch">
Get the pitch setting - Usage: pitchampbal.GetPitch();
Return value: The pitch setting, in the range 0.125 to 8.0
</item>
<item name="GetAmplification">
Get the amplification setting - Usage: pitchampbal.GetAmplification();
Return value: The amplification setting, in the range 0.125 to 8.0
</item>
<item name="GetBalance">
Get the balance setting - Usage: pitchampbal.GetBalance();
Return value: The balance setting, in the range -1.0 to 1.0
</item>
<item name="SetPitch">
Set the pitch setting - Usage: pitchampbal.SetPitch(pitch);
pitch The pitch and tempo to set (a multiple of 'normal') in the range of 0.125 to 8.0
</item>
<item name="SetAmplification">
Set the amplification setting - Usage: pitchampbal.SetAmplification(gain);
gain The gain to set in the range of 0.125 to 8.0
</item>
<item name="SetBalance">
Set the balance - Usage: pitchampbal.SetBalance(balance);
balance The balance to set in the range of -1.0 to 1.0 (negative being to the left)
</item>
<item name="RegisterChangeCallback">
Register for callback whenever pitch, amplification, or balance settings change. - Usage: pitchampbal.RegisterChangeCallback(name, script, context);
name The name of the callback, for future reference.
script The script to call when settings have changed.
context Optional: The object that the script should be run from. Default: The pitchampbal object
Return value: 'registered' if success.
</item>
<item name="UnregisterChangeCallback">
Unregister a previously registered callback. - Usage: pitchampbal.UnregisterChangeCallback(name, context);
name The name of the callback to unregister.
context Optional: The object that the script is associated with. Default: The pitchampbal object
Return value: 'unregistered' if success.
</item>
</section>
<section name="ID3Editor">
<item name="RegisterCallback">
Register for callback when a playlist event occurs. - Usage: ID3Editor.RegisterCallback(name, script, context);
name The name of the callback to hook. Valid callbacks are: 'GetSucceeded,' 'GetFailed,' 'SetSucceeded,' and 'SetFailed.'
script The script to call when a playlist event occurs.
context Optional: The object to run the script from. Default: the playlist object
</item>
<item name="UnregisterCallback">
Unregister for callback. - Usage: ID3Editor.UnregisterCallback(name, context);
name The name of the callback to unregister.
context Optional: The object associated with the callback. Default: the playlist object
</item>
<item name="GetTags">
Get the ID3 tags from a file - Usage: ID3Editor.GetTags(URL);
URL the file location - like 'C:/audio/artist - title.mp3'
Return value: 'getting' if success, error details otherwise
</item>
<item name="SetTags">
Set the ID3 tags. - Usage: ID3Editor.SetTags(URL, unicode, stripoldtags, id3v1, tags);
URL the file location - like 'C:/audio/artist - title.mp3'
unicode true if any of the tags are not ascii, false otherwise
stripoldtags true if you'd like to clean out any old tags, false otherwise
id3v1 true if ID3v1 tags should be written as well (NB: if unicode is true, the ID3v1 tags will be empty except for the year)
tags an array of ID3 information (see the return from GetTags for formatting and the available tag fields). Notes: The track number can be like '12' or '12/14.' The genre can be either a ID3v1 style genre number like '(3)' or a genre string like 'no wave'
Return value: 'setting' if success, error details otherwise
</item>
</section>
<section name="files">
<item name="RegisterFileAssociation">
Registers a file extention for Sonique 2 - Usage: files.RegisterFileAssociation(ext, actions, description);
ext The extention to register
actions A comma delimited list of actions. Possible values are "open" and "add".
description Optional: A description of the file type eg., Ogg Vorbis file Default: null
</item>
<item name="UnregisterFileAssociation">
Unregister a file extention for Sonique2 - Usage: files.UnregisterFileAssociation(ext);
ext The extention to unregister
</item>
<item name="IsFileAssociationRegistered">
Queries whether a file association is registered for Sonique2. - Usage: files.IsFileAssociationRegistered(ext);
ext The extention to query
Return value: If registered, the type of registration, othereise false
</item>
</section>
<section name="playlists">
<item name="AddPlaylist">
Add a playlist - Usage: playlists.AddPlaylist(name);
name The name of the playlist to add.
Return value: 'done' on success
</item>
<item name="RemovePlaylist">
Remove a playlist - Usage: playlists.RemovePlaylist(name);
name The name of the playlist to remove.
Return value: 'done' on success
</item>
<item name="RenamePlaylist">
Rename a playlist - Usage: playlists.RenamePlaylist(oldname, newname);
oldname The name of the playlist to rename.
newname Its new name.
Return value: 'renamed' on success
</item>
<item name="GetPlaylistList">
Retrieve a list of playlists - Usage: playlists.GetPlaylistList();
Return value: An array of playlist objects.
</item>
<item name="GetPlaylist">
Get the specified playlist - Usage: playlists.GetPlaylist(name);
name the name of the playlist
Return value: the playlist object's UID
</item>
<item name="MakeTempPlaylist">
Create a temporary playlist - Usage: playlists.MakeTempPlaylist(name);
name The prefered name of the playlist to create
Return value: Actual name of the playlist (this may differ from the preferred name)
bAppend Optional: If false, this replaces the dest with the source Default: true
Return value: Actual name of the playlist (this may differ from the preferred name)
</item>
<item name="SetIdleScan">
Configure the playlist idle scan - Usage: playlists.SetIdleScan(mode);
mode One of the following: 'none' 'quick' or 'thorough'
</item>
</section>
<section name="players">
<item name="AddPlayer">
Add a player - Usage: players.AddPlayer(name);
name The name of the player to add.
Return value: 'done' on success
</item>
<item name="RemovePlayer">
Remove a player - Usage: players.RemovePlayer(name);
name The name of the player to remove.
Return value: 'done' on success
</item>
<item name="RenamePlayer">
Rename a player - Usage: players.RenamePlayer(oldname, newname);
oldname The name of the player to rename.
newname Its new name.
Return value: 'renamed' on success
</item>
<item name="GetPlayerList">
Retrieve a list of players - Usage: players.GetPlayerList();
Return value: An array of player objects.
</item>
<item name="GetPlayer">
Get the specified player - Usage: players.GetPlayer(name);
name the name of the player
Return value: the player object's UID
</item>
<item name="MakeTempPlayer">
Create a temporary player - Usage: players.MakeTempPlayer(name);
name The prefered name of the player to create
Return value: Actual name of the player (this may differ from the preferred name)
</item>
<item name="GetEndpointList">
Get a list of available endpoints (audio output devices) - Usage: players.GetEndpointList();
Each endpoint is reported as an array with the following members: 'name', 'description', 'factoryID'.
Return value: An array of endpoints (audio output devices)
</item>
<item name="GetDefaultEndpoint">
What is the default output device? - Usage: players.GetDefaultEndpoint();
Return value: The name of the default endpoing (output device)
</item>
<item name="SetDefaultEndpoint">
Set the default output device? - Usage: players.SetDefaultEndpoint(device);
device The name of the audio output device to use as the default endpoint.
Return value: The name of the default endpoing (output device)
</item>
<item name="GetStreamList">
Get a list of available streams (audio input devices) - Usage: players.GetStreamList();
Return value: An array of streams (audio input devices)
Each stream is reported as an array with the following members: 'name', 'description', 'factoryID'.
</item>
<item name="GetFilterList">
Get a list of available filters (audio decoding devices) - Usage: players.GetFilterList();
Return value: An array of filters (audio decoding devices)
Each filter is reported as an array with the following members: 'name', 'description', 'factoryID'.
</item>
<item name="GetDSPList">
Get a list of available dsps (audio processing devices) - Usage: players.GetDSPList();
Return value: An array of DSPs (audio processing devices)
Each DSP is reported as an array with the following members: 'name', 'description', 'factoryID'.
</item>
<item name="GetMiscAudioList">
Get a list of available miscellaneous audio plugins - Usage: players.GetMiscAudioList();
Return value: An array of audio settings objects
Each plugin is reported as an array with the following members: 'name', 'description', 'factoryID'.
</item>
<item name="GetMetaFilterList">
Get a list of available miscellaneous audio plugins - Usage: players.GetMetaFilterList();
Return value: An array of audio settings objects
Each plugin is reported as an array with the following members: 'name', 'description', 'factoryID'.
</item>
<item name="GetWriterList">
Get a list of available writer audio plugins - Usage: players.GetWriterList();
Return value: An array of audio settings objects
Each plugin is reported as an array with the following members: 'name', 'description', 'factoryID'.
</item>
</section>
<section name="playlist">
<item name="AddItem">
Add an item to the playlist - Usage: playlist.AddItem(item, where);
item The URL or filename of the item to add to the playlist, or an array of URLs and filenames.
where Optional: 'top', 'bottom' or the UID of the item to place it after Default: bottom
</item>
<item name="RemoveItem">
Remove items from the playlist - Usage: playlist.RemoveItem(items);
items The UID of an item to remove, or an array of UIDs.
Return value: 'removed' on success, null on error.
</item>
<item name="MoveItem">
Move items in the playlist - Usage: playlist.MoveItem(item, where);
item A UID (or array of UIDS) to move within the playlist
where Optional: 'top', 'bottom' or the UID of the item to place them after Default: bottom
Return value: 'moved' on success, null on error
</item>
<item name="RemoveAll">
Remove all items from the playlist. - Usage: playlist.RemoveAll();
Return value: 'removed' on success, null on error
</item>
<item name="GetFirstUID">
Get the UID of the first item in the playlist - Usage: playlist.GetFirstUID(bShuffled);
The following code will count how many items are in the playlist:
$key = :sonique.playlists.default.Lock();
$UID = :sonique.playlists.default.GetFirstUID();
$count = 1;
while ($UID = :sonique.playlists.default.GetNextUID($UID))
{
$count++;
}
:sonique.playlists.default.Unlock($key);
bShuffled Optional: If true, this retrieves items in the order that they will be played with the current shuffling. Otherwise, it sorts by the playlist item numbers. Default: true
Return value: The UID of the first item in the playlist
</item>
<item name="GetNextUID">
Get the UID of the next item in the playlist - Usage: playlist.GetNextUID(UID, bShuffled);
The following code will count how many items are in the playlist:
$key = :sonique.playlists.default.Lock();
$UID = :sonique.playlists.default.GetFirstUID();
$count = 1;
while ($UID = :sonique.playlists.default.GetNextUID($UID))
{
$count++;
}
:sonique.playlists.default.Unlock($key);
// Better would be :sonique.playlsits.default.GetCount();
UID The UID of the item you're currently at.
bShuffled Optional: If true, this retrieves items in the order that they will be played with the current shuffling. Otherwise, it sorts by the playlist item numbers. Default: true
Return value: The UID of the next item in the playlist, or null if we're at the end.
</item>
<item name="GetPrevUID">
Get the UID of the previous item in the playlist - Usage: playlist.GetPrevUID(UID, bShuffled);
UID The UID of the item you're currently at.
bShuffled Optional: If true, this retrieves items in the order that they will be played with the current shuffling. Otherwise, it sorts by the playlist item numbers. Default: true
Return value: The UID of the previous item in the playlist, or null if we're at the beginning.
</item>
<item name="Reshuffle">
Reshuffle the playlist. - Usage: playlist.Reshuffle();
</item>
<item name="Sort">
Sort the playlist. - Usage: playlist.Sort(field, direction);
field Which field to sort by. This can be artist, title, duration, url or any of the values returned from GetTokenList()
direction Optional: The direction to sort by ('forwards' or 'reverse') Default: forwards
Return value: 'sorted' on success, null on failure
</item>
<item name="AdvancedSort">
Sort the playlist by multiple fields. - Usage: playlist.AdvancedSort(criterion1, criterion2, ...);
criterion1 The first sort criterion. An array of {field, direction} (see Sort for more explanation of field and direction). An array with just 'field' is assumed to be 'forwards' in direction.
criterion2 Optional: the next sort criterion.
... Optional: other sort criterion. the criteria are sorted in the order they appear in the arguments list..
Return value: 'sorted' on success, null on failure
</item>
<item name="Randomize">
Randomize the order of the playlist - Usage: playlist.Randomize();
Return value: 'randomized' on success, otherwise null.
</item>
<item name="Reverse">
Reverse the order of the playlist - Usage: playlist.Reverse();
Return value: 'reversed' on success, otherwise null.
</item>
<item name="Lock">
Locks the playlist for manipulation. - Usage: playlist.Lock();
This function locks the playlist so that other threads won't change it. You should use it when performing a number of operations that require the playlist to not change in between. After locking it, you should whatever operations you want and then unlock it within a relatively short period of time, to ensure that other playlist operations remain responsive.
Return value: A cookie that must be used with Unlock, or null on error.
</item>
<item name="Unlock">
Unlock a previously locked playlist. See the Lock function for details. - Usage: playlist.Unlock(cookie);
cookie The cookie returned by Lock
Return value: 'unlocked' on success, null otherwise
</item>
<item name="UpdateLock">
Refresh the lock on the playlist so it doesn't time out. - Usage: playlist.UpdateLock(cookie);
Locks will eventually time out (after 30 seconds or so). If this is a problem, you should refresh the lock. This will not be necessary except in extraordinary cases. Use this with extreme care - if this is misused it will effectively make the playlist unusable from the rest of the program.
cookie The cookie returned by Lock
Return value: 'updated' on success, null otherwise.
</item>
<item name="GetCurrentVersion">
Gets the revision number of the playlist. This increments whenever the playlist changes. - Usage: playlist.GetCurrentVersion();
Return value: The revision number of the playlist
</item>
<item name="GetCurrentList">
Retrieves the playlist as an array of UIDs - Usage: playlist.GetCurrentList();
Return value: An array of UIDs currently in the playlist.
</item>
<item name="GetChangeList">
Retrieves a list of what has changed in the playlist. - Usage: playlist.GetChangeList(rev);
rev The revision that you wish to diff against
Return value: An array, containing a subarray of UIDs (named 'ids'), the current version (named 'version') and a boolean value telling whether the order changed (named 'order_changed')
</item>
<item name="GetCount">
How many items are in the playlist? - Usage: playlist.GetCount();
Return value: The number of items in the playlist
</item>
<item name="GetUIDIndex">
Get the index of the specified UID in the playlist. - Usage: playlist.GetUIDIndex(UID);
UID The UID to search for.
Return value: The index of that UID
</item>
<item name="GetUIDAtIndex">
Get the UID at a given index. - Usage: playlist.GetUIDAtIndex(index);
index Which UID to get.
Return value: The UID at the specified index.
</item>
<item name="GetUIDForURL">
Search for a URL - Usage: playlist.GetUIDForURL(URL);
URL The URL to search for
Return value: The UID that corresponds with a given URL. If that URL is in the playlist multiple times, only one will be returned. If no results are found, null is returned.
</item>
<item name="GetTotalPlaylistTime">
The total playlist length - Usage: playlist.GetTotalPlaylistTime();
Return value: An array, containing an element named 'time' with the time, and an element named type which will be one of the following: duration_estimate, duration_verified, duration_unknown, duration_infinite
</item>
<item name="GetSongAtTime">
Get the info for the song at the specified time into the playlist. - Usage: playlist.GetSongAtTime(time);
time The time into the playlist to query.
Return value: An array containing the following elements: id, url, title, artist, duration, duration_type, album, and subposition (how far into this song we are at the given time)
</item>
<item name="GetSongAtPercent">
Get the info for the song at the specified percent through the playlist. - Usage: playlist.GetSongAtPercent(percent);
percent How far through the playlist to query.
Return value: An array containing the following elements: id, url, title, artist, duration, duration_type, album, and subposition (how far into this song we are at the given percent)
</item>
<item name="GetUIDInfo">
Returns a structure describing the playlist entry with the specified ID - Usage: playlist.GetUIDInfo(UID);
UID The UID to query (or an array of UIDs)
Return value: An array with the following fields: uid, url, title, artist, duration, duration_type. If an array is passed in, the return value will be an array of these arrays.
</item>
<item name="GetTokenList">
Get a list of token names - which can then be passed into Sort() - Usage: playlist.GetTokenList();
Return value: An array containing one array for each unique token name. Each of those arrays has two elements, name and count (the number of occurences in the playlist of this token)
</item>
<item name="RegisterCallback">
Register for callback when a playlist event occurs. - Usage: playlist.RegisterCallback(name, script, context);
name The name of the callback to hook. Valid callbacks are: 'unknown', 'ItemsAdded', 'ItemsMoved', 'ItemsRemoved', 'ItemsUpdated', 'AllItemsRemoved', 'AllItemsMoved', 'IdleScanStarted', 'IdleScanStopped', 'IdleScanSettingChanged', 'ScanningStarted', 'ScanningFinished'
script The script to call when a playlist event occurs.
context Optional: The object to run the script from. Default: the playlist object
</item>
<item name="UnregisterCallback">
Unregister for callback. - Usage: playlist.UnregisterCallback(name, context);
name The name of the callback to unregister.
context Optional: The object associated with the callback. Default: the playlist object
</item>
<item name="SetIdleScan">
Set the idlescan mode - Usage: playlist.SetIdleScan(mode, startnow);
mode quick, thorough, or none.
startnow Optional: Determines whether to start scanning immediately. Default: true
</item>
<item name="StartIdleScan">
Forces the idle scan to start (in case it's not set to start immediately) - Usage: playlist.StartIdleScan();
</item>
<item name="StopIdleScan">
Forces the idle scan to stop - Usage: playlist.StopIdleScan();
</item>
<item name="CurrentlyIdleScanning">
Are we currently idle scanning? - Usage: playlist.CurrentlyIdleScanning();
Return value: true if we are, false if we aren't.
</item>
<item name="IdleScanningIsActive">
Is the idle scan thread actively scanning files? - Usage: playlist.IdleScanningIsActive();
Return value: true if we are, false if we aren't.
</item>
<item name="ScanFile">
do a scan of the specified file - Usage: playlist.ScanFile(URL, mode);
URL The file location.
mode quick or thorough
Return value: success if the file is in the playlist
</item>
</section>
<section name="player">
<item name="Play">
If the player is stopped or paused, play - Usage: player.Play();
Return value: 'Playing' if we were started playing, null if we already were.
</item>
<item name="WaveWrite">
Similar to play, except that the audio is written to a file instead of (or including) it being played through the normal output device. If the parameter is true, then sound comes out of the output device normally as well as being written to file(s). If the parameter is false then the normal output method is totally bypassed and data is written as fast as possible to the file(s). - Usage: player.WaveWrite(bAudible);
bAudible Optional: True if you want to listen to the file while it is being written, false otherwise. Default: false
Return value: 'Writing' if this call succeeds, NULL otherwise.
</item>
<item name="Stop">
If the player is playing or paused, stop. - Usage: player.Stop();
Return value: 'Stopped' if we stopped, null if we were already stopped.
</item>
<item name="pause">
If the player is playing, pause playback. - Usage: player.pause();
Return value: 'Paused' if we paused playback, null if we were not currently playing.
</item>
<item name="TogglePause">
If playing, pause. If paused, play. - Usage: player.TogglePause();
</item>
<item name="IsPlaying">
Query whether the player is not stopped. - Usage: player.IsPlaying();
Return value: true if it is playing, false if it isn't.
</item>
<item name="IsPaused">
Query whether the player is not paused. - Usage: player.IsPaused();
Return value: true if it is paused, false if it isn't.
</item>
<item name="Next">
Skip to the next track in the playlist (in accordance with shuffle and what not) - Usage: player.Next();
</item>
<item name="Previous">
Skip to the previous track in the playlist (in accordance with shuffle and what not) - Usage: player.Previous();
</item>
<item name="SeekTo">
Seek to a given track in the playlist - Usage: player.SeekTo(UID, offset);
UID The UID of the item in the playlist to skip to.
offset Optional: How many seconds into the song to skip to. Default: 0
</item>
<item name="SeekToIndex">
Seek to a given index into the playlist - Usage: player.SeekToIndex(index, offset);
index The index of the item in the playlist to skip to.
offset Optional: How many seconds into the song to skip to. Default: 0
</item>
<item name="SeekToTime">
Seek to the specified time into the currently playing track - Usage: player.SeekToTime(time, bAccurate);
time How many seconds into the song to skip to.
bAccurate Optional: Use false to give a quick preview (for instance if the user is dragging a slider) and true for the final seek Default: true
</item>
<item name="Scan">
Scan forward or backwards by the specified amount - Usage: player.Scan(time, bAccurate);
time How many seconds skip. (negative means scan back)
bAccurate Optional: Use false to give a quick preview (for instance if the user is dragging a slider) and true for the final scan Default: true
</item>
<item name="GetInfo">
Get information on the current play state - Usage: player.GetInfo();
Return value: An array containing the following fields: info (an array describing the current track, with the fields 'uid', 'url', 'title', 'artist', 'duration', and 'duration_type'), 'playstate' (an array with the following fields: 'state' (may be 'stopped', 'paused', or 'playing'), 'shuffled' (true or false), 'repeat' ('off', 'one' or 'all')), 'cursongid' (the UID of the current song), 'numsongs' (the number of songs in the playlist), 'cursongindex' (the index into the playlist currently playing), and 'curplaytime' (how many seconds into the current track we are).
</item>
<item name="GetPlayProgress">
Query the estimated amount of time through the playlist we're at. - Usage: player.GetPlayProgress();
</item>
<item name="GetShuffle">
Query whether shuffle play is enabled. - Usage: player.GetShuffle();
Return value: true if it is, false if it isn't.
</item>
<item name="SetShuffle">
Enable or disable shuffle play - Usage: player.SetShuffle(shuffle);
shuffle true to enable shuffle play, false to disable
</item>
<item name="ToggleShuffle">
Toggle shuffle play - Usage: player.ToggleShuffle();
</item>
<item name="GetRepeat">
Query repeat play is status. - Usage: player.GetRepeat();
Advance through repeat settings 'off', 'one', and 'all. - Usage: player.ToggleRepeat();
</item>
<item name="GetVolume">
Get the current playback volume - Usage: player.GetVolume();
Return value: The volume, between 0.0 and 1.0
</item>
<item name="SetVolume">
Set the current playback volume. - Usage: player.SetVolume(vol);
vol A number between 0.0 (silence) and 1.0 (pretty loud)
</item>
<item name="GetPlaybackMethod">
What is the current playback mode? - Usage: player.GetPlaybackMethod();
Return value: An array with two items 'method' (one of: 'normal', 'seamless', 'crossfade', or 'unknown') and 'transitiontime' (a number of seconds)
</item>
<item name="SetPlaybackMethod">
Set the playback mode - Usage: player.SetPlaybackMethod(method, time);
method 'normal', 'seamless', or 'crossfade'
time Optional: How long to spend transitioning between tracks. Default: -1
</item>
<item name="SetSaveStreams">
Enable or disable stream saving - Usage: player.SetSaveStreams(bSaveStreams);
bSaveStreams 1 to start saving streams or 0 to stop.
</item>
<item name="GetSaveStreams">
Determine whether stream saving is enabled or disabled - Usage: player.GetSaveStreams();
</item>
<item name="RegisterCallback">
Register for callback when a player event occurs. - Usage: player.RegisterCallback(name, script, context);
name The name of the callback to hook. Valid callbacks are: 'Playing', 'Stopping', 'Pausing', 'SongStarted','VolumeChanged', 'Seeking', 'SeekFailed', 'Seeked', 'PlayFailed', 'CurrentIDChanged', 'ShuffleChanged', 'RepeatChanged', 'PlaybackMethodChanged', and 'AssociatedPlaylistChanged'
script What to do when player events occur.
context Optional: The object to run the script from. Default: the player object
</item>
<item name="UnregisterCallback">
Unregister a previously registered callback. - Usage: player.UnregisterCallback(name, context);
name The name of the callback to unregister.
context Optional: The object associated with the callback. Default: the player object
</item>
<item name="GetAssociatedPlaylistName">
Get the name of the playlist associated with this player - Usage: player.GetAssociatedPlaylistName();
Return value: The name of the playlist or 'unknown' if not known.
</item>
<item name="GetAssociatedPlaylist">
Get the UID of the playlist associated with this player - Usage: player.GetAssociatedPlaylist();
Return value: The UID, or if unavailabe, null
</item>
<item name="SetAssociatedPlaylist">
Set which playlist this player is playing from - Usage: player.SetAssociatedPlaylist(uid);
uid The UID of the playlist to use.
</item>
<item name="SendFilterMessage">
Send a message to a filter that's being used to play the current track. - Usage: player.SendFilterMessage(message);
message A filter-specific message. If that filter is not in use, the message will be ignored.
</item>
<item name="GetFileExtensions">
What file extensions can this player play? - Usage: player.GetFileExtensions();
Return value: An array of arrays, each of which has fields named: 'ext' (the extention), and 'desc' (a description)
</item>
</section>
<section name="playersetting">
<item name="get">
Get a setting by name. - Usage: playersetting.get(name);
name The name of the setting to get.
Return value: The value currently set, or a null string of unset.
</item>
<item name="set">
Set a setting by name. - Usage: playersetting.set(name, value);
name The name of the setting to set.
value The value to set it to.
</item>
</section>
<section name="player">
<item name="GetTitleString">
Get the title of the currently playing track. - Usage: player.GetTitleString(format, player);
format Optional: How to format the title string. Default: :sonique.player.DefaultTitleFormat
player Optional: The name of the player to query. Default: default
</item>
<item name="GetTimeString">
Get the time of the currently playing track. - Usage: player.GetTimeString(format, mode, player);
format Optional: How to format the time string. Default: :sonique.player.DefaultTimeFormat
mode Optional: Time display mode. Options are: 'timeremaining', 'totaltime', and 'elapsed' Default: elapsed
player Optional: The name of the player to query. Default: default
</item>
<item name="GetTrackString">
Get the number of the currently playing track. - Usage: player.GetTrackString(format, player);
format Optional: How to format the track string. Default: :sonique.player.DefaultTrackFormat
player Optional: The name of the player to query. Default: 'default'
</item>
<item name="GetTotalTimeString">
Get the total length of a playlist. - Usage: player.GetTotalTimeString(format, playlist);
format Optional: How to format the time string. Default: :sonique.player.DefaultTotalTimeFormat
playlist Optional: The name of the playlist to query. Default: 'default'
</item>
<item name="GetTimeSeekString">
Get the string to display when seeking a certain amount. - Usage: player.GetTimeSeekString(time, format);
time The time in seconds we would be seeking.
format Optional: How to format the time string. Default: :sonique.player.DefaultTimeSeekFormat
</item>
<item name="GetTitleSeekString">
Get the string to display when seeking a specific track. - Usage: player.GetTitleSeekString(uid, format, playlist);
uid The UID of the track we'd be seeking to.
format Optional: How to format the time string. Default: :sonique.player.DefaultTrackSeekFormat
playlist Optional: The name of the playlist to query. Default: 'default'
</item>
<item name="GetTitleTimeSeekString">
Get the string to display when seeking a specific track and time. - Usage: player.GetTitleTimeSeekString(uid, time, format, playlist);
uid The UID of the track we'd be seeking to.
time The time into the track to seek to.
format Optional: How to format the time string. Default: :sonique.player.DefaultTitleTimeSeekFormat
playlist Optional: The name of the playlist to query. Default: 'default'
</item>
<item name="GetInfoString">
Get a string describing the format of the current audio stream. - Usage: player.GetInfoString(format, player);
format Optional: How to format the info string. Default: :sonique.player.DefaultInfoFormat
player Optional: The name of the player to query. Default: 'default'
</item>
</section>
<section name="prefs">
<item name="GetString">
Retrieves a string from the preferences. For use with multiple nodes of the same name and location. - Usage: prefs.GetString(section, name);
section The section containing the preferences.
name The name of the item within the section.
Return value: The current value of that preference.
</item>
<item name="GetStringArray">
Retrieves an array string values from the preferences. - Usage: prefs.GetStringArray(section, name);
section The section containing the preferences.
name The name of the items within the section.
Return value: An array containing the current values of the named preferences.
</item>
<item name="SetString">
Set a string in the prefernces - Usage: prefs.SetString(section, name, value);
section The section containing the preferences.
name The name of the item within the section.
value The value to set it to.
</item>
<item name="SetStringArray">
Set multiple strings in the prefernces. For use with multiple nodes of the same name and location, - Usage: prefs.SetStringArray(section, name, values);
section The section containing the preferences.
name The name of the items within the section.
values The array of values to set them to.
</item>
<item name="PrepString">
Set a string value in the preferences, if it doesn't already exist. - Usage: prefs.PrepString(section, name, value);
section The section containing the preferences.
name The name of the item within the section.
value The value to set it to.
</item>
<item name="CreateSection">
Create a preferences section in which you can store data. - Usage: prefs.CreateSection(section);
section The section containing the preferences. If this section already exists, nothing happens.
</item>
<item name="DoesSectionExist">
Query whether a section exists - Usage: prefs.DoesSectionExist(section);
section The section to query for existance.
Return value: true if it does, false if it doesn't
</item>
<item name="Save">
Force Sonique to write all preferences out to disk. This normally happens only on program shutdown. - Usage: prefs.Save();
</item>
</section>
<section name="sonique">
<item name="InstallInterface">
Register a skin or interface. - Usage: :sonique.InstallInterface(path);
path The path to the interface.
</item>
<item name="OpenFiles">
Present the user with a file open dialog. Selected files are added to the playlist. - Usage: :sonique.OpenFiles(playlist, immediate, append);
playlist Optional: The playlist to add the files to. Default: 'default'
immediate Optional: Play or load it immediately Default: current settings
append Optional: Append it to the current playlist? false means clear the playlist first. Default: current settings
</item>
<item name="BrowseForFolder">
Present the user with a folder browser dialog. - Usage: :sonique.BrowseForFolder(title, path);
title Optional: The title displayed in the browse dialogue. Default: 'null'
path Optional: The path that is initially selected in the browse dialogue. Default: 'null'
Return value: The selected folder path.
</item>
<item name="BrowseForFiles">
Present the user with a file open dialog. - Usage: :sonique.BrowseForFiles(title, multiplefiles, filterlist, filterdescription);
title Optional: The title displayed in the browse dialogue. Default: 'null'
multiplefiles Optional: true if multiple files can be selected, false otherwise Default: true
filterlist Optional: A semi-colon delimitted list of extensions to filter by. example: "*.mp3;*.mpa;*.mp2;*.mp1" Default: 'null'
filterdescription Optional: The label for the extension filter list. example: "MPEG Audio Files (*.mp3, *.mpa, *.mp2, *.mp1)" Default: 'null'
Return value: An array of paths for the selected files.
</item>
<item name="SavePlaylistFile">
Present the user with a file save dialog, to chose where to save the playlist. - Usage: :sonique.SavePlaylistFile(playlist);
playlist Optional: The playlist to save. Default: 'default'
</item>
<item name="LoadPlaylistFile">
Present the user with a file load dialog, to chose where to load the playlist from. - Usage: :sonique.LoadPlaylistFile(playlist, append);
playlist Optional: The playlist to load. Default: 'default'
append Optional: Append to the currently loaded playlist? True means yes. Default: false
</item>
<item name="LoadSkin">
Reskin the current application window. If there is no main application window, once will be opened. - Usage: :sonique.LoadSkin(interface, skin);
interface The unique name of an interface containing the skin to load.
skin The name of the skin
</item>
<item name="SetLanguage">
Set the order of language preference. - Usage: :sonique.SetLanguage(langauges);
langauges An array of names of languages to use, in order of descending preference. GetLanguageList() will show available languages.
</item>
<item name="SetLanguageIndex">
Select a single language, by index. - Usage: :sonique.SetLanguageIndex(index);
index The index of the language to select. GetLanguageList() will show available languages.
</item>
<item name="GetLanguageList">
Enumerate available languages. - Usage: :sonique.GetLanguageList();
Return value: An array of languages that are at least partially available.
</item>
<item name="GetInterfaceList">
Enumerate available interfaces. - Usage: :sonique.GetInterfaceList();
Return value: An array of interfaces that are available.
</item>
<item name="CreateInterfaceWindow">
Create a child window from the specified interface. - Usage: :sonique.CreateInterfaceWindow(interface, MMLType, MMLName, name, offset, alignment, context, bVisible, flags, bBelowParent, MMLFlags, CreateChildren, FactoryID);
interface The unique name of an interface containing the window to create.
proportion Optional: If set, this draws a slider on the status bar, filled according to this parameter's position between 0.0 and 1.0 Default: -1
text2 Optional: The text to display to the right of the aforementioned slider. Default: null
context Optional: The window to set the status text of. Default: the calling object
</item>
<item name="LaunchRemote">
Creates a a new remote window - Usage: :sonique.LaunchRemote(interface, remote);
interface The unique name of the interface
remote The name of the remote
</item>
<item name="LaunchAppWindow">
Creates a new application window with the named skin loaded. This means it will look in the current *interface* for the named skin. Note: This does not change what skin is the *current* skin. - Usage: :sonique.LaunchAppWindow(name);
name The display name of the window (the 'name' attribute from your export tag)
</item>
<item name="LaunchWindow">
Launch a window - Usage: :sonique.LaunchWindow(interface, windowtype, name, createtype);
interface The unique identifier for the interface to load the window from.
windowtype The type of window - either a MID or a text string
name The name of the window, in the MML
createtype Optional: The MID or text string of the factory to create the window from. NB: use Sonique2_Frame to make your window behave like a top level window (remote or skin). If this param is missing, it will use the MID from your windowtype param. Default: null
</item>
<item name="LaunchLocalWindow">
Launch a window which is defined in the current interface. - Usage: :sonique.LaunchLocalWindow(name, windowtype, createtype);
name The name of the window, in the MML
windowtype Optional: The type of window - either an MID or a text string. Default: generic
createtype Optional: The MID or text string of the factory to create the window from. NB: use Sonique2_Frame to make your window behave like a top level window (remote or skin). If this param is missing, it will use the MID from your windowtype param. Default: Sonique2_Frame
</item>
<item name="LaunchSettingsPopup">
Launch a popup settings window. - Usage: :sonique.LaunchSettingsPopup();
</item>
<item name="LaunchID3EditPopup">
Launch a popup ID3 editor. - Usage: :sonique.LaunchID3EditPopup();
</item>
<item name="LaunchInterfaceBrowserPopup">
Launch a popup interface browser. - Usage: :sonique.LaunchInterfaceBrowserPopup();
</item>
<item name="LaunchURL">
Ask the operating system to launch the URL (using the system's associated application). - Usage: :sonique.LaunchURL(location);
location the URL (NB: be sure to escape back slash characters - 'http:\\\\www.sonique.com\\')
Return value: true/false for success/failure
</item>
<item name="LaunchHelp">
Launch the help window - Usage: :sonique.LaunchHelp(section);
section The section within help to start in (currently: 'index', 'about', 'hotkeys', or 'playlist')
</item>
<item name="RemoveInterface">
Unload an interface. - Usage: :sonique.RemoveInterface(The unique name of the interface to remove);
The unique name of the interface to remove
</item>
<item name="RemoveInterfacePackage">
Unload all interfaces associated with a package - Usage: :sonique.RemoveInterfacePackage(package);
package The path of the package.
</item>
<item name="CompactMem">
Compact Memory. Don't use lightly. - Usage: :sonique.CompactMem();
</item>
<item name="GetMinimizeAllToTray">
Will all windows minimize to systray at once? Note: SetMinimizeToTray must be true or this has no effect - Usage: :sonique.GetMinimizeAllToTray();
Return value: True if all windows will minimize to tray at once to one icon, false if they'll minimize to the systray individually to the one icon.
</item>
<item name="GetMinimizeToTray">
Will windows minimize to systray? - Usage: :sonique.GetMinimizeToTray();
Return value: True if windows will minimize to one systray icon, false if they'll minimize to the taskbar.
</item>
<item name="SetMinimizeAllToTray">
Set if all windows will minimize to systray at once(one for all, all for one style) Note: SetMinimizeToTray must be true or this has no effect - Usage: :sonique.SetMinimizeAllToTray(bEnable);
bEnable is a boolean value - true to enable, false to disable.
</item>
<item name="SetMinimizeToTray">
Set if windows will minimize to systray? - Usage: :sonique.SetMinimizeToTray(bEnable);
bEnable is a boolean value - true to enable, false to disable(minimize to taskbar).
</item>
<item name="SetKnobRadialControl">
Enable or disable alternat knob interface. - Usage: :sonique.SetKnobRadialControl(radial);
radial true means knobs spin to face cursor, false up/down and left/right will spin the knob.
</item>
<item name="GetKnobRadialControl">
Retrieve the knob's radial control status. - Usage: :sonique.GetKnobRadialControl();
Return value: false for up/down, left/right control, true for radial control
</item>
<item name="SetKnobSensitivity">
Set the knob sensitivity. - Usage: :sonique.SetKnobSensitivity(sensativity);
sensativity 500 is the installation default. Higher means faster knobs, lower means higher precision.
</item>
<item name="GetKnobSensitivy">
How sensitive are the knob controls? - Usage: :sonique.GetKnobSensitivy();
Return value: A sensitivity value. 500 is the installation default. Higher is more reactive to mouse movement.
</item>
<item name="EnableDithering">
Enable dithering on low bit depth displays - Usage: :sonique.EnableDithering(dither);
dither true - dither. false - don't dither. 24 bit displays will never dither.
</item>
<item name="AddFile">
Add a file (or directory) to Sonique. Audio, skins, visuals, whatever. - Usage: :sonique.AddFile(file, playlist, immediate, append);
file The path to the file or directory to add.
playlist Optional: The name of the playlist to add it to, if it's not a skin or something. Default: 'default'
immediate Optional: Play or load it immediately Default: current settings
append Optional: Append it to the current playlist? false means clear the playlist first. Default: current settings
</item>
<item name="Scramble">
Jumbles up a string, makes it unreadable at a glance - Usage: :sonique.Scramble(string);
string Something that makes sense.
Return value: Something that doesn't make sense.
</item>
<item name="Unscramble">
Unjumbles a previously scrambled string. - Usage: :sonique.Unscramble(string);
string Something that doesn't make sense.
Return value: Something that makes sense
</item>
<item name="InterfacePrefsGetString">
Retrieves a string from the interface preferences. For use with multiple nodes of the same name and location. - Usage: :sonique.InterfacePrefsGetString(section, name);
section The section containing the preferences.
name The name of the item within the section.
Return value: The current value of that preference.
</item>
<item name="InterfacePrefsGetStringArray">
Retrieves an array string values from the interface preferences. - Usage: :sonique.InterfacePrefsGetStringArray(section, name);
section The section containing the preferences.
name The name of the items within the section.
Return value: An array containing the current values of the named preferences.
</item>
<item name="InterfacePrefsSetString">
Set a string in the interface preferences - Usage: :sonique.InterfacePrefsSetString(section, name, value);
section The section containing the preferences.
name The name of the item within the section.
value The value to set it to.
</item>
<item name="InterfacePrefsSetStringArray">
Set multiple strings in the interface preferences. For use with multiple nodes of the same name and location, - Usage: :sonique.InterfacePrefsSetStringArray(section, name, values);
section The section containing the preferences.
name The name of the items within the section.
values The array of values to set them to.
</item>
<item name="InterfacePrefsPrepString">
Set a string value in the interface preferences, if it doesn't already exist. - Usage: :sonique.InterfacePrefsPrepString(section, name, value);
section The section containing the preferences.
name The name of the item within the section.
value The value to set it to.
</item>
<item name="InterfacePrefsCreateSection">
Create a preferences section in the interface preferences which you can store data. - Usage: :sonique.InterfacePrefsCreateSection(section);
section The section containing the preferences. If this section already exists, nothing happens.
</item>
<item name="InterfacePrefsDoesSectionExist">
Query whether a section exists in the interface preferences - Usage: :sonique.InterfacePrefsDoesSectionExist(section);
section The section to query for existance.
Return value: true if it does, false if it doesn't
</item>
<item name="URLEncode">
URL encode the given string - Usage: :sonique.URLEncode(string);
string The string to encode.
Return value: the encoded string
</item>
<item name="URLDecode">
URL decode the given string - Usage: :sonique.URLDecode(string);
string The string to decode.
Return value: the decoded string
</item>
<item name="GetExtension">
return the extension of the given path - Usage: :sonique.GetExtension(path);
path The path.
Return value: the extension
</item>
<item name="GetBaseName">
return the filename from the given path - Usage: :sonique.GetBaseName(path);
path The path.
Return value: the file name
</item>
<item name="GetDirName">
return the directory of the given path - Usage: :sonique.GetDirName(path);
path The path.
Return value: the directory
</item>
<item name="SetCdAutoPlay">
Sets sonique to auto-play CDs - Usage: :sonique.SetCdAutoPlay(bEnable);
bEnable True to enable, false to disable.
</item>
<item name="GetCdAutoPlay">
Gets sonique to auto-play CDs - Usage: :sonique.GetCdAutoPlay();
Return value: 'true' if enabled, 'false' if disabled.
</item>
<item name="GetSystemDrives">
todo - Usage: :sonique.GetSystemDrives();
Associative Drive Array notes:
drive = path of drive (e.g. c:\ or d:\)
type = numeric representing the drive type.
2 - floppy/removeable type
3 - hard drive/fixed
4 - network drive/remote
5 - cdrom drive
6 - ram disk
Return value: Two dimensional array of drives and their types
</item>
<item name="SetRemoveFromTaskbar">
todo - Usage: :sonique.SetRemoveFromTaskbar();
</item>
<item name="GetRemoveFromTaskbar">
todo - Usage: :sonique.GetRemoveFromTaskbar();
</item>
</section>
<section name="posteffects">
<item name="Get">
Get a setting parameter - Usage: posteffects.Get(group, name);
group The name of the visual group
name The name of the setting to retrieve
Return value: The value of that parameter.
</item>
<item name="Set">
Set a setting parameter - Usage: posteffects.Set(group, name, value);
group The name of the visual group
name The name of the setting to set
value The value to set
</item>
<item name="SendFilterMessage">
Send a filter message to the post effects enabled in a visual group. - Usage: posteffects.SendFilterMessage(group, message);
group The name of the visual group
message The message to send. That can notify post effects to reload their settings, etc.
</item>
</section>
<section name="visualsetting">
<item name="Get">
Get a setting parameter - Usage: visualsetting.Get(group, name);
group The name of the visual group
name The name of the setting to retrieve
Return value: The value of that parameter.
</item>
<item name="Set">
Set a setting parameter - Usage: visualsetting.Set(group, name, value);
group The name of the visual group
name The name of the setting to set
value The value to set
</item>
<item name="SendFilterMessage">
Send a filter message to the post effects enabled in a visual group. - Usage: visualsetting.SendFilterMessage(group, message);
group The name of the visual group
message The message to send. That can notify post effects to reload their settings, etc.
</item>
</section>
<section name="visuals">
<item name="GetVisualList">
Get a list of the IDs of all visuals currently loaded. - Usage: visuals.GetVisualList();
Return value: An array of IDs
</item>
<item name="GetVisualInfoList">
Get a list of information about all currently loaded visuals. - Usage: visuals.GetVisualInfoList();
Return value: An array of arrays with the following fields: 'id', 'name', 'author', and 'version'
</item>
<item name="GetVisualInfo">
Get info about a specific visual by ID - Usage: visuals.GetVisualInfo(id);
id The id of the visual
Return value: An array with the following fields: 'id', 'name', 'author', and 'version'
</item>
<item name="LoadVisual">
Loads a visual into the visual system - Usage: visuals.LoadVisual(path);
path The filename of the visual to load
</item>
<item name="UnloadVisual">
Unload a visual from the visual system - Usage: visuals.UnloadVisual(which);
which The id or filename of the visual to unload
</item>
<item name="GroupNextVisual">
Tell all windows in the specified group to change to the next available visual - Usage: visuals.GroupNextVisual(group);
group The name of the visual group
</item>
<item name="GroupPrevVisual">
Tell all windows in the specified group to change to the previous available visual - Usage: visuals.GroupPrevVisual(group);
group The name of the visual group
</item>
<item name="GroupSetVisual">
Tell all windows in the specified group to change to a certain visual. - Usage: visuals.GroupSetVisual(group, id);
group The name of the visual group
id The id of the visual to change to
</item>
<item name="GroupIsPostEffectEnabled">
Does this visual group have a specific posteffect enabled? - Usage: visuals.GroupIsPostEffectEnabled(group, posteffect);
group The name of the visual group
posteffect The factory id of the post effect to query
Return value: true if it does, false if it doesn't
</item>
<item name="GroupEnablePostEffect">
Enable or disable a posteffect for all windows belowing to a visual group. - Usage: visuals.GroupEnablePostEffect(group, posteffect, enable);
group The name of the visual group
posteffect The factory id of the post effect to enable or disable
enable True to enable, false to disable
</item>
<item name="GetPostEffectList">
List the available posteffects - Usage: visuals.GetPostEffectList();
Return value: An array of arrays with the following fields: 'name', 'description', 'factoryID'
</item>
<item name="RegisterGroupChangeCallback">
Register a callback for when the callback group's settings change - Usage: visuals.RegisterGroupChangeCallback(name, script, context);
name The name of the callback
script What to do when stuff changes
context Optional: The object to call the script from. Default: the visual object
</item>
<item name="UnregisterGroupChangeCallback">
Unregister a previously registered callback. - Usage: visuals.UnregisterGroupChangeCallback(name, context);
name The name of the callback
context Optional: The object associated with the callback. Default: the visual object
</item>
</section>
<section name="EqualizerWindow">
<item name="UpdateDisplay">
Causes the equalizer control's data to be refreshed and redrawn - Usage: EqualizerWindow.UpdateDisplay();
</item>
<item name="UpdateBands">
Causes the equalizer control's gain data to be refreshed and redrawn - Usage: EqualizerWindow.UpdateBands();
</item>
</section>
<section name="playlistwin">
<item name="GetAssociatedPlaylist">
Get the playlist associated with this control. - Usage: PlaylistWindow.GetAssociatedPlaylist();
Return value: The playlist
</item>
<item name="SetAssociatedPlaylist">
Set the playlist associated with this control. NB: this will fail if the playlist does not match the associated player's playlist. - Usage: PlaylistWindow.SetAssociatedPlaylist(playlist);
playlist The name of the playlist to associate with this playlist window.
</item>
<item name="GetCurrentItem">
Get the user's current item (where the cursor is) - Usage: PlaylistWindow.GetCurrentItem();
Return value: The playlist ID of the current item
</item>
<item name="SeturrentItem">
Move the current item (the cursor). - Usage: PlaylistWindow.SeturrentItem(id);
id The playlist UID of the item to move to.
</item>
<item name="GetSelectedItems">
Get the selected items - Usage: PlaylistWindow.GetSelectedItems();
Return value: An array of playlist UIDs of the selected items.
</item>
<item name="SetSelectedItems">
Set the list of selected items - Usage: PlaylistWindow.SetSelectedItems(items);
items An array of playlist UIDs to select.
</item>
<item name="ClearSelection">
De-select all selected items. - Usage: PlaylistWindow.ClearSelection();
</item>
<item name="ScrollToShowItem">
Scroll the playlist window to make the specified item visible. - Usage: PlaylistWindow.ScrollToShowItem(id);
id The playlist UID of the item to move to.
</item>
<item name="ScrollToItem">
Scroll so that an item is at the top or bottom of the window. - Usage: PlaylistWindow.ScrollToItem(id, where);
id The playlist UID of the item to move to.
where 'top' or 'bottom'
</item>
<item name="GetAssociatedPlayer">
Get the name of the associated player. NB: if there is no associated player, this returns an empty string. - Usage: PlaylistWindow.GetAssociatedPlayer();
</item>
<item name="SetAssociatedPlayer">
Associate a player to this playlist window. NB: When you change the player, the control's associated playlist will be changed to match the player's associated playlist. If the player does not exist, no player will be associated with this window. - Usage: PlaylistWindow.SetAssociatedPlayer(player);
player Optional: The name of the player to associate with this playlist window. Default: null
</item>
<item name="GetAvailableColumnList">
Get the available playlist columns. - Usage: PlaylistWindow.GetAvailableColumnList();
Return value: An array of column ID's and their language labels for use in getting the appropriate name for the column. Use :language.Translate with playlistwindow/playlist.[name] to get the proper label.
</item>
<item name="RemoveColumn">
Remove the column from the playlist. - Usage: PlaylistWindow.RemoveColumn(id);
id the ID of the column to remove
</item>
<item name="InsertColumn">
Insert the column in the playlist (if it is not in there already). - Usage: PlaylistWindow.InsertColumn(id, index, width);
id the ID of the column to insert
index Optional: the index of the new column (0 being leftmost) Default: 1
width Optional: a suggested width percentage. Default: 0.2
</item>
</section>
<section name="interfaceswin">
<item name="Scan">
Scroll throught the interfaces window. - Usage: InterfacesWindow.Scan(direction, count);
direction "left" or "right"
count Optional: How many interfaces to scroll though. Default: 1
Return value: success or not
</item>
</section>
<section name="onlinewin">
<item name="SetURL">
Set the URL for the location of the content for this window. - Usage: OnlineWindow.SetURL(URL);
URL The location of the MML content. Note: the content of this location should have an interface name of 'general/sonique2_online/online'
Return value: success or not
</item>
<item name="ReloadContent">
Refresh the online window. - Usage: OnlineWindow.ReloadContent(URL);
URL Optional: The location of the MML content. Note: the content of this location should have an interface name of 'general/sonique2_online/online' Default: use the window's URL
Return value: success or not
</item>
</section>
<section name="framewin">
<item name="ShowMenu">
Open the popup menu at the given point. - Usage: FrameWindow.ShowMenu(mousepoint);
mousepoint (array) {x,y} giving pointer location to display the menu (relative to the frame window).
</item>
<item name="SetMenuProperty">
Load the given property and refresh the menu's imagestyles. - Usage: FrameWindow.SetMenuProperty(name);
name the name of the property (like "SQ2_PopupMenu")
</item>
</section>
<section name="displaywindow">
<item name="DisplayWindow">
Choose which window to show in the display - Usage: DisplayWindow.DisplayWindow(window);
window Which window to display
</item>
<item name="ToggleWindow">
Toggle a window in the display - Usage: DisplayWindow.ToggleWindow(window);
window Which window to toggle
</item>
<item name="History">
Jump to a relative location in the history. - Usage: DisplayWindow.History(where);
where 0 is the current window, -1 is the previous, 1 is the next in the list
</item>
</section>
<section name="VisWin">
<item name="GetAssociatedPlayer">
Get the player from which this visual gets its data. - Usage: VisWin.GetAssociatedPlayer();
Return value: The name of the player
</item>
<item name="SetAssociatedPlayer">
Select a player to get data from. - Usage: VisWin.SetAssociatedPlayer(player);
player The name of the player to use.
</item>
<item name="GetVisualGroup">
Which visual group are we a memmber of - Usage: VisWin.GetVisualGroup();
Return value: The name of a visual group.
</item>
<item name="SetVisualGroup">
Which visual group should we be a member of? - Usage: VisWin.SetVisualGroup(group);
group The name of the visual group to join
</item>
<item name="NextVisual">
Go to the next visual in the list of loaded visuals. - Usage: VisWin.NextVisual();
</item>
<item name="PrevVisual">
Go to the previous visual in the list of loaded visuals. - Usage: VisWin.PrevVisual();
</item>
<item name="SetVisual">
Set the visual window to dispaly a specific visual. - Usage: VisWin.SetVisual(visual);
visual The id of the visual to display
</item>
<item name="GetVisual">
Which visual are we currently displaying? - Usage: VisWin.GetVisual();
Return value: The id of the visual
</item>
<item name="EnablePostEffect">
Enable or disable a posteffect. - Usage: VisWin.EnablePostEffect(posteffect, enable);
posteffect The factoryID of the posteffect to enable or disable.
enable true - enable the posteffect. false - disable it.
</item>
</section>
<section name="FullScreenVis">
<item name="LaunchFullScreenVis">
Launch the specified visual in full-screen mode - Usage: FullScreenVis.LaunchFullScreenVis(vis, player, res, bitdepth);
vis The name or ID of the visual to launch
player Optional: The player whose output to visualize Default: default
res Optional: Desired resolution to run at, an array of x, y. Default: user preference or {640,480}
bitdepth Optional: Desired bit depth ("high", "medium", "low"). Default: user preference or "medium"
</item>
<item name="GetDeviceList">
Get Information about installed DirectDraw devices - Usage: FullScreenVis.GetDeviceList();
Return value: Array of arrays containing the following fields: 'id', 'name', 'description', 'GUID'
</item>
<item name="SetDisplayDevice">
Set the Device to use for DirectDraw operations - Usage: FullScreenVis.SetDisplayDevice(display);
display The GUID of the display to use.
</item>
<item name="GetDisplayDevice">
Get the Device to use for DirectDraw operations - Usage: FullScreenVis.GetDisplayDevice();
Return value: The GUID of the display
</item>
</section>
</section>
</language>
</module>
<module name="mml">
<language name="English">
<section name="help">
<section name="math">
<item name="Truncate">
Truncate a number. - Usage: :math.Truncate(val, precision);
val is the number to truncate.
precision Optional: determines how many digits after the decimal point should remain. Default: 0
Get the absolute value of a number. - Usage: :math.Abs(val);
val is the number.
Return value: The absolute (unsigned) value of a number
</item>
<item name="Round">
Round the number to the lowest integer if the decimal portion is less than .5, to the highest integer otherwise. - Usage: :math.Round(val);
val is the number to round.
Return value: The number rounded to the nearest integer.
</item>
<item name="Ceil">
Return the smallest integer not less than the given number. - Usage: :math.Ceil(val);
val is the number.
Return value: The ceiling of the given value.
</item>
<item name="Floor">
Return the largest integer not greater than the given number. - Usage: :math.Floor(val);
val is the number.
Return value: The floor of the given value.
</item>
<item name="ACos">
Return the arc cosine of the given angle. - Usage: :math.ACos(val);
val The angle in radians.
Return value: The arc cosine of the given angle, in the range of 0.0 through pi.
</item>
<item name="ASin">
Return the arc sine of the given angle. - Usage: :math.ASin(val);
val The angle in radians.
Return value: The arc sine of the given angle, in the range of -pi/2 through pi/2.
</item>
<item name="ATan">
Return the arc tangent ine of the given angle. - Usage: :math.ATan(val);
val The angle in radians.
Return value: The arc tangent of the given angle, in the range of -pi/2 through pi/2.
</item>
<item name="ATan2">
Returns the angle formed by the given point and the origin. - Usage: :math.ATan2(x, y);
x The x coordinate.
y The y coordinate.
Return value: The angle in radians.
</item>
<item name="Cos">
Return the cosine of the given angle. - Usage: :math.Cos(val);
val The angle in radians.
Return value: The cosine of the given angle.
</item>
<item name="Random">
Generate a random number. - Usage: :math.Random();
The following code will generate a pseudo-random number between 0 and 3:
$random = :math.Random() % 4;
Return value: A pseudo-random integer in the range from 0 to 2147483647.
</item>
<item name="Sin">
Return the sine of the given angle. - Usage: :math.Sin(val);
val The angle in radians.
Return value: The sine of the given angle.
</item>
<item name="Sqrt">
Return the square root of the given number. - Usage: :math.Sqrt(val);
val The number to calculate the square root of. If the number is less than zero, it will error.
Return value: The square root of the given number.
</item>
<item name="Tan">
Return the tangent of the given angle. - Usage: :math.Tan(val);
val The angle in radians.
Return value: The tangent of the given angle.
</item>
</section>
<section name="string">
<item name="CharAt">
Fetch the character at the given index. - Usage: :string.CharAt(string, index);
string The string containing the character.
index The index of the character you would like returned.
Return value: The character as a string
</item>
<item name="Compare">
Lexicographically compare two strings. - Usage: :string.Compare(string1, string2, casesensitive);
string1 The first string.
string2 The second string
casesensitive Optional: True if the comparison should be case sensitive (default), false if the comparison should ignore case. Default: true
Return value: A number less than zero if the first string lexicographically is less than the second, zero if exactly equal, and greater than zero if greater than the second.
</item>
<item name="SubStrIndex">
Find the given substring in the string. - Usage: :string.SubStrIndex(string, substring, casesensitive, start);
string The string to search in.
substring The string to search for.
casesensitive Optional: True if the substring comparison should be case sensitive, false if the comparison should ignore case (default). Default: false
start Optional: The index to start searching from. Default: 0
Return value: If the substring was found, its' index. Otherwise, -1.
</item>
<item name="Length">
Get the length of the string. - Usage: :string.Length(string);
string is the string
Return value: The number of characters in the given string.
</item>
<item name="SubString">
Returns a substring of the given string. - Usage: :string.SubString(string, start, len);
string is the original string.
start The index from which to start the substring.
len The number of characters in the substring.
Return value: A new string that is a substring of the given string.
</item>
<item name="ToLower">
Converts all characters in the given string to lower case. - Usage: :string.ToLower(string);
string is the string.
Return value: A new string which is the lower case version of the given string.
</item>
<item name="ToUpper">
Converts all characters in the given string to upper case. - Usage: :string.ToUpper(string);
string is the string.
Return value: A new string which is the upper case version of the given string.
</item>
<item name="StripWhiteSpace">
Removes whitespace from the beginning and end of the given string. - Usage: :string.StripWhiteSpace(string);
string is the string.
Return value: A new string which has all spaces, tabs and hard returns removed from its beginning and end.
</item>
</section>
<section name="clock">
<item name="GetLocalTime">
Fetch the current date/time information from the OS - Usage: :clock.GetLocalTime(24hour);
24hour Optional: true if the hour should be in 24 hour format (0-23), false if 12 hour format (1-12) Default: false
Return value: an array of date/time data
</item>
</section>
<section name="app">
<item name="Exit">
Close all windows and Exit the application. - Usage: :app.Exit();
</item>
<item name="GetVersion">
Get the version string of Sonique - Usage: :app.GetVersion();
Return value: The version string
</item>
<item name="GetBuildTime">
Get the build time of this application. - Usage: :app.GetBuildTime();
Return value: The date and time this copy of the application was built.
</item>
<item name="GetAppName">
Get the name of the application. - Usage: :app.GetAppName();
bEnable is a boolean value - true to enable, false to disable.
</item>
<item name="RegisterWindowKeyScript">
Register a script to be executed when a certain key is pressed in this window - Usage: :app.RegisterWindowKeyScript(key, script, context, windowcontext);
key the key code to react to, e.g. "ctrl-c", "ctrl-shift-s", "pageup"
script the script to execute when this key is pressed
context Optional: the context to execute the script in Default: none
windowcontext Optional: the window in which to trap this keypress Default: window the calling script is from
Return value: true/false for success/failure
</item>
<item name="UnregisterWindowKeyScript">
Remove an script registered to a keypress by RegisterWindowKeyScript - Usage: :app.UnregisterWindowKeyScript(key, script, context, windowcontext);
key the key code to unregister
script the script which was passed to RegisterWindowKeyScript. this is needed to check that your script is currently the one still registered.
context Optional: the context which was passed to RegisterWindowKeyScript. Default: none
windowcontext Optional: the window context which was passed to RegisterWindowKeyScript. Default: window the calling script is from
Return value: true/false for success/failure
</item>
<item name="RegisterGlobalKeyScript">
Register a script to be executed when a certain key is pressed in any window - Usage: :app.RegisterGlobalKeyScript(key, script, context);
key the key code to react to, e.g. "ctrl-c", "ctrl-shift-s", "pageup"
script the script to execute when this key is pressed
context Optional: the context to execute the script in Default: none
Return value: true/false for success/failure
</item>
<item name="UnregisterGlobalKeyScript">
Remove an script registered to a keypress by RegisterGlobalKeyScript - Usage: :app.UnregisterGlobalKeyScript(key, script, context);
key the key code to unregister
script the script which was passed to RegisterGlobalKeyScript. this is needed to check that your script is currently the one still registered.
context Optional: the context which was passed to RegisterGlobalKeyScript. Default: none
Return value: true/false for success/failure
</item>
<item name="GetScreenDimensions">
Get an array of the screen dimensions (one entry pre device) - Usage: :app.GetScreenDimensions();
</item>
</section>
<section name="console">
<item name="Write">
Print a string to the console. - Usage: :console.Write(stuff, mode);
stuff is a value to output. If it is an array it will be displayed as text.
mode Optional: How to log the result. Options are: 'debug', 'info', 'logtext', 'commandtext', 'commandresult', 'warning', and 'error' Default: logtext
</item>
<item name="Echo">
Print a string to the console, with a newline at the end. - Usage: :console.Echo(stuff, mode);
stuff is a value to output. If it is an array it will be displayed as text.
mode Optional: How to log the result. Options are: 'debug', 'info', 'logtext', 'commandtext', 'commandresult', 'warning', and 'error' Default: logtext
</item>
<item name="EnableDiskLogging">
Turns console disk logging on or off. - Usage: :console.EnableDiskLogging(bEnable, This);
bEnable is a boolean value - true to enable, false to disable.
This causes the console to be logged to a file when it's on. Normally this uses"consolelog.txt".
</item>
</section>
<section name="data">
<item name="IsScalar">
Is this data item a string? - Usage: $data.IsScalar();
Return value: true, if the item is a number or string, false if it is an array.
</item>
<item name="IsArray">
Is the data item an array? - Usage: $data.IsArray();
Return value: true if the item is an array, false if it is a number or a string.
</item>
<item name="ArraySize">
How large is an array? - Usage: $data.ArraySize();
Return value: the number of elements in $MyArray.
</item>
<item name="IsValidIndex">
Is foo a valid array index? - Usage: $data.IsValidIndex(index);
index is a number or string which may or may not be a valid index into $MyArray.
Return value: true if $MyArray[index] would evaluate succesfully, false otherwise.
</item>
</section>
<section name="base">
<item name="BroadcastScript">
Broadcast a script to all children. - Usage: Object.BroadcastScript(script);
script is a script to be run by Object and all of its children (meaning in their contexts). All return values are ignored.
</item>
<item name="Funcs">
Enumerate functions. - Usage: Object.Funcs();
Return value: An array of the names of the functions which Object contains.
</item>
<item name="Help">
Retrieve help information. - Usage: Object.Help();
Return value: A description of Object's usage. Note that Object may be a function.
</item>
<item name="Children">
Enumerate children. - Usage: Object.Children();
Return value: An array of the names of the child objects which Object contains.
</item>
<item name="Members">
Enumerate members. - Usage: Object.Members();
Return value: An array of the names of the members (data) which Object contains.
</item>
<item name="All">
Enumerate everything. - Usage: Object.All();
Return value: An array of tne names of everything which Object contains.
</item>
<item name="DoesChildExist">
Does an object contain a certain child? - Usage: Object.DoesChildExist(childname);
childname is the name of the child which Object may or may not contain.
Return value: true if Object contains a child, member, or function named childname. Otherwise false.
</item>
<item name="Name">
Ask an object its name. - Usage: Object.Name();
Return value: The name of the object.
</item>
<item name="ObjectType">
Ask an object it's type. - Usage: Object.ObjectType();
Return value: The internal name of Object's type. You probably won't find this useful.
</item>
<item name="Version">
Ask an object it's version. - Usage: Object.Version();
Return value: The revision number of an object's internal implementation. Please refrain from writing Mantis Script code which relies on this function if possible.
</item>
</section>
<section name="consolewin">
<item name="SetMinDisplayType">
Select the minimm severity of messages that are displayed on the console. - Usage: Console.SetMinDisplayType(severity);
severity Options are: 'debug', 'info', 'warning', and 'error'
</item>
</section>
<section name="button">
<item name="GetHover">
Query a control's hover status. - Usage: Button.GetHover();
Return value: True, if the hover is enabled. False if hover is disabled.
</item>
<item name="SetHover">
Set a control's hover status. - Usage: Button.SetHover(bHoverState);
bHoverState True to enable mouse over hovering, false to disable it.
</item>
<item name="SetButtonState">
Set a button's state. - Usage: Button.SetButtonState(state, delayed);
state A number representing which state the button should transition to.
delayed An optional parameter. True to use normal transitions, false for instaneous results. Default is true.
</item>
<item name="GetButtonState">
Retrieve a button's state. - Usage: Button.GetButtonState();
Return value: The number of the state that is currently active for Button.
</item>
<item name="GetToggle">
Get a button's toggle state. - Usage: Button.GetToggle();
Return value: True if the button is in Toggle mode (that is, it automatically switches between states 0 and 1 when clicked), false otherwise.
</item>
<item name="SetToggle">
Set a button's toggle state. - Usage: Button.SetToggle(bToggle);
bToggle True if you wish the button to automatically switch between states 0 and 1 when clicked, false otherwise.
</item>
<item name="GetText">
Get the button's display text. - Usage: Button.GetText();
</item>
<item name="SetText">
Set the button's display text. - Usage: Button.SetText(string);
string The text to display on the button.
</item>
</section>
<section name="EditControl">
<item name="GetText">
Retrieve an Edit control's contents. - Usage: (null).GetText();
Return value: The text contents of the Edit control.
</item>
<item name="SetText">
Set the contents of an Edit Control. - Usage: (null).SetText(text);
text What to set the edit control's contents to.
</item>
</section>
<section name="language">
<item name="Translate">
Translate a string. - Usage: :language.Translate(key, module);
key The name of the string to translate - this is a series of section names, each followed by a slash and then an item name, as laid out in the language XML file.
module Optional: The name of the module the string belongs to. Default: "sonique gui"
Return value: The translation (in the currently selected language) of the key
</item>
</section>
<section name="picker">
<item name="GetCurrentItem">
Get the currently selected item. - Usage: Picker.GetCurrentItem();
Return value: The text contents of the currently selected item.
</item>
<item name="GetCurrentIndex">
Get the index of the selected item. - Usage: Picker.GetCurrentIndex();
Return value: The numeric index of the currently selected item, 0 being the first.
</item>
<item name="SetCurrentItem">
Sets the selected item. - Usage: Picker.SetCurrentItem(value, Note);
value May be either an array or a string. If it's an array, it may have an element named 'text' the value of which is the label for the new item, and an element named"data" which is the data associated with it. If value is a string, it is used for the control's label.
Note that this will replace the current item with the new information.
Return value: "set" if success. null if failure.
</item>
<item name="SetCurrentIndex">
Selects an item by index. - Usage: Picker.SetCurrentIndex(index);
index The numeric index of the item to set, beginning with 0.
</item>
<item name="GetItem">
Gets the contents of an item by index. - Usage: Picker.GetItem(index, Return);
index The numeric index of the item to get, beginning with 0.
Return value An array, with an elenment named"text" containing the item's label, and, if available, an item named 'data' containing it's associated data.
</item>
<item name="SetItem">
Sets the contents of an item by index. - Usage: Picker.SetItem(index, value, Note);
index The numeric index of the item to set, beginning with 0.
value May be either an array or a string. If it's an array, it may have an element named 'text' the value of which is the label for the new item, and an element named 'data' which is the data associated with it. If value is a string, it is used for the control's label.
Note that this will replace the item previously at index with the new information.
Return value: "set" if success. null if failure.
</item>
<item name="AddItem">
Add a new item on to the end of the picker list. - Usage: Picker.AddItem(value);
value May be either an array or a string. If it's an array, it may have an element named"text" the value of which is the label for the new item, and an element named 'data' which is the data associated with it. If value is a string, it is used for the control's label.
Return value: "added" if success. null if failure.
</item>
<item name="InsertItem">
Insert a new item into the picker list. - Usage: Picker.InsertItem(index, value);
index The numeric index of the item to insert before, beginning with 0.
value May be either an array or a string. If it's an array, it may have an element named"text" the value of which is the label for the new item, and an element named 'data' which is the data associated with it. If value is a string, it is used for the control's label.
Return value: "inserted" if success, null if failure.
</item>
<item name="RemoveItem">
Remove an item from the picker list. - Usage: Picker.RemoveItem(index);
index The numeric index of the item to remove, beginning with 0.
Return value: "removed" if success, null if failure.
</item>
<item name="GetAllItems">
Get the contents of the picker list. - Usage: Picker.GetAllItems();
Return value: An array of the items in the picker. Each item is itself an array, containing an element named 'text', which holds the item's label, and, if available, an item named 'data' containing data associated with the item.
</item>
<item name="SetAllItems">
Set the contents of the picker list. - Usage: Picker.SetAllItems(items);
items An array of items to replace the entire contents of the picker with. Each item may be either an array or a string. If it's an array, it may have an element named 'text' the value of which is the label for the new item, and an element named 'data' which is the data associated with it. If value is a string, it is used for the control's label.
Return value: "set" if success, null otherwise.
</item>
</section>
<section name="spinbutton">
<item name="GetRealPos">
Get the spinner's position, 0.0 to 1.0. - Usage: Spinner.GetRealPos();
Return value: A number in the range 0.0 to 1.0
</item>
<item name="GetIntPos">
Get the spinner's integral position. - Usage: Spinner.GetIntPos();
Return value: A number between the min and max integer positions
</item>
<item name="SetRealPos">
Set the spinner's position, 0.0 to 1.0. - Usage: Spinner.SetRealPos(pos);
pos A number in the range 0.0 to 1.0. 0.5 would set the Spinner to be half way between its minimum and maximum values.
</item>
<item name="SetIntPos">
Set the spinner's position. - Usage: Spinner.SetIntPos(pos);
pos A number between the spinner's minimum and maximum values.
</item>
<item name="GetMin">
Get the spinner's mimimum integer position. - Usage: Spinner.GetMin();
Return value: The minimum value that spinner can hold.
</item>
<item name="GetMax">
Get the spinner's maximum integer position. - Usage: Spinner.GetMax();
Return value: The maximum value that spinner can hold.
</item>
</section>
<section name="selectionlist">
<item name="IsIndexSelected">
Returns whether the supplied index is selected or not. - Usage: List.IsIndexSelected(index);
index The index of the item whose selection state is to be queried.
Return value: True if the item is selected, false otherwise.
</item>
<item name="IsItemSelected">
Returns whether the given item is selected or not. - Usage: List.IsItemSelected(name);
name The name of an item in the list.
Return value: True if the item named name is selected, otherwise false.
</item>
<item name="SetIndexSelected">
Set the specified item's selected state. - Usage: List.SetIndexSelected(index, bSelect);
index Which item to select or deselect.
bSelect true to select the item, false to deselect it.
</item>
<item name="SetItemSelected">
Set the specified item's selected state. - Usage: List.SetItemSelected(name, bSelect);
name The name of the item to select or deselect.
bSelect true to select the item, false to deselect it.
</item>
<item name="GetSelectedIndexes">
Get the selected items - Usage: List.GetSelectedIndexes();
Return value: An array of the selected indeces in the selection list.
</item>
<item name="SetSelectedIndexes">
Set the list of selected indeces - Usage: List.SetSelectedIndexes(indexes);
indexes An array of the indeces of the items to select.
</item>
<item name="GetSelectedItems">
Get the selected items - Usage: List.GetSelectedItems();
Return value: An array of the names of the selected items in the selection list
</item>
<item name="SetSelectedItems">
Set the list of selected items - Usage: List.SetSelectedItems(items);
items An array of the names of the items to select.
</item>
<item name="ClearSelection">
De-select all selected items. - Usage: List.ClearSelection();
</item>
<item name="GetItem">
Get the contents of an item by index. - Usage: List.GetItem(index);
index The index of the item to retrieve.
Return value: The text at that index.
</item>
<item name="SetItem">
Set the contents of an item by index. - Usage: List.SetItem(index, contents);
index The index of the item to set.
contents A string containing the text to be displayed in the item.
Return value: "set" if success, null if failure.
</item>
<item name="AddItem">
Add a new item on to the end of the selection list. - Usage: List.AddItem(value);
value May be either an array or a string. If it's an array, it may have an element named"text" the value of which is the label for the new item, and an element named 'data' which is the data associated with it. If value is a string, it is used for the control's label.
Return value: "added" if success. null if failure.
</item>
<item name="InsertItem">
Insert a new item into the selection list. - Usage: List.InsertItem(index, value);
index The numeric index of the item to insert before, beginning with 0.
value May be either an array or a string. If it's an array, it may have an element named 'text' the value of which is the label for the new item, and an element named 'data' which is the data associated with it. If value is a string, it is used for the control's label.
Return value: "inserted" if success, null if failure.
</item>
<item name="RemoveItem">
Remove an item from the selection list. - Usage: List.RemoveItem(index);
index The numeric index of the item to remove, beginning with 0.
Return value: "removed" if success, null if failure.
</item>
<item name="GetAllItems">
Get the contents of the selection list. - Usage: List.GetAllItems();
Return value: An array of the items in the selection list. Each item is itself an array, containing an element named 'text' (which holds the item's label), an element 'selected' (which is either true or false, depending on the status of the item) and, if available, an item named 'data' containing data associated with the item.
</item>
<item name="SetAllItems">
Set the contents of the selection list. - Usage: List.SetAllItems(items);
items An array of items to replace the entire contents of the selection list with. Each item may be either an array or a string. If it's an array, it may have an element named 'text' the value of which is the label for the new item, and an element named 'data' which is the data associated with it. If value is a string, it is used for the control's label.
Return value: "set" if success, null otherwise.
</item>
</section>
<section name="slider">
<item name="GetRealPos">
Get the slider's position, 0.0 to 1.0. - Usage: Slider.GetRealPos();
Return value: A number in the range 0.0 to 1.0
</item>
<item name="GetIntPos">
Get the slider's integral position. - Usage: Slider.GetIntPos();
Return value: A number between the min and max integer positions
</item>
<item name="SetRealPos">
Set the slider's position, 0.0 to 1.0. - Usage: Slider.SetRealPos(pos);
pos A number in the range 0.0 to 1.0. 0.5 would set the slider to be half way between its minimum and maximum values.
</item>
<item name="SetIntPos">
Set the slider's position. - Usage: Slider.SetIntPos(pos);
pos A number between the slider's minimum and maximum values.
</item>
<item name="GetMin">
Get the slider's mimimum integer position. - Usage: Slider.GetMin();
Return value: The minimum value that slider can hold.
</item>
<item name="GetMax">
Get the slider's maximum integer position. - Usage: Slider.GetMax();
Return value: The maximum value that Slider can hold.
</item>
<item name="SetMin">
Set the slider's minimum integer position. - Usage: Slider.SetMin(min);
min The new lower bound of the slider's range.
</item>
<item name="SetMax">
Set the slider's maximum integer position. - Usage: Slider.SetMax(max);
max The new upper bound of the slider's range.
</item>
</section>
<section name="window">
<item name="SetWindowTitle">
Set the operating system window title (i.e. what shows up in the taskbar and sys tray). - Usage: Window.SetWindowTitle(title, bSticky);
title the new title
bSticky Optional: whether it is sticky or not. non-sticky titles will be overwritten with now-playing info or the next call to SetWindowTitle. Default: false
</item>
<item name="GetWindowTitle">
Set the operating system window title (i.e. what shows up in the taskbar and sys tray). - Usage: Window.GetWindowTitle();
Return value: the window title
</item>
<item name="GetDesiredFPS">
Retrieve the desired frame rate. - Usage: Window.GetDesiredFPS();
Return value: The desired frame rate, in Frames Per Second.
</item>
<item name="GetActualFPS">
Retrieve the actual frame rate. - Usage: Window.GetActualFPS();
Return value: The actual frame rate, in Frames Per Second.
</item>
<item name="SetDesiredFPS">
Set the desired frame rate. - Usage: Window.SetDesiredFPS(rate);
rate The desired frame rate, in Frames Per Second.
</item>
<item name="GetLocation">
Retrieve the window location. - Usage: Window.GetLocation();
Return value: An array (x,y) containing the position of the window relative to it's parent or the desktop (if a top level window)
</item>
<item name="GetOffset">
Retrieve the window offset. - Usage: Window.GetOffset(component);
component Optional:"left","top","right", or"bottom" to select a component of the offset, or nothing for all, in an array.
Return value: If no component is specifies, an array (l,t,r,b) containing the offset of the window relative to it's parent or the desktop (if a top level window). If a component is specified, only that will be returned.
</item>
<item name="GetAlignment">
Retrieve the window alignment. - Usage: Window.GetAlignment(component);
component Optional:"left","top","right", or"bottom" to select a component of the alignment, or nothing for all, in an array.
Return value: If no component is specifies, an array (l,t,r,b) containing the alignment of the window relative to it's parent or the desktop (if a top level window). If a component is specified, only that will be returned.
</item>
<item name="GetSize">
Retrieve the window size. - Usage: Window.GetSize();
Return value: An array (x,y) containing the dimensions in pixels of the window.
</item>
<item name="GetVirtSize">
Retrieve the window's virtual size. - Usage: Window.GetVirtSize();
Return value: An array (x,y) containing the dimensions in pixels of the window's virtual area.
</item>
<item name="GetPan">
Retrieve the window size. - Usage: Window.GetPan();
Return value: An array (x,y) containing the location of the pan origin.
</item>
<item name="SetLocation">
Set the window location. - Usage: Window.SetLocation(pos, start, duration, tweenfunc, bRelative, bCancelOp);
pos An array (x,y) containing the new position of the window
start Optional: How many milliseconds from now to start moving. Default: 0
duration Optional: How long (milliseconds) to move for. Default: 0
tweenfunc Optional: How to move - options are linear, linear_accel, linear_decel, linear_smooth, and linear_bounce. Default: linear
bRelative Optional: If this is true, pos is relative to the current position. Otherwise it's relative to the parent window or (if a top level window) the desktop. Default: false
bCancelOp Optional: If this is true, all other pending SetLocation operations are cancelled. Default: true
</item>
<item name="SetSize">
Set the window size. - Usage: Window.SetSize(size, start, duration, tweenfunc, bRelative, bCancelOp);
size An array (x,y) containing the new size of the window
start Optional: How many milliseconds from now to start resizing. Default: 0
duration Optional: How long (milliseconds) to resize for. Default: 0
tweenfunc Optional: How to resize - options are linear, linear_accel, linear_decel, linear_smooth, and linear_bounce. Default: linear
bRelative Optional: If this is true, pos is relative to the current size, otherwise it's an absolute size. Default: false
bCancelOp Optional: If this is true, all other pending SetSize operations are cancelled. Default: true
</item>
<item name="SetPan">
Set the window pan origin. - Usage: Window.SetPan(pos, start, duration, tweenfunc, bRelative, bCancelOp);
pos An array (x,y) containing the new pan origin of the window
start Optional: How many milliseconds from now to start panning. Default: 0
duration Optional: How long (milliseconds) to pan for. Default: 0
tweenfunc Optional: How to move - options are linear, linear_accel, linear_decel, linear_smooth, and linear_bounce. Default: linear
bRelative Optional: If this is true, pos is relative to the current pan origin. Otherwise it's absolute. Default: false
bCancelOp Optional: If this is true, all other pending SetPan operations are cancelled. Default: true
</item>
<item name="SetVirtSize">
Set the window's virtual size. - Usage: Window.SetVirtSize(size, start, duration, tweenfunc, bRelative, bCancelOp);
size An array (x,y) containing the new virtual size of the window. This may make parts of the window not visible.
start Optional: How many milliseconds from now to start resizing. Default: 0
duration Optional: How long (milliseconds) to resize for. Default: 0
tweenfunc Optional: How to resize - options are linear, linear_accel, linear_decel, linear_smooth, and linear_bounce. Default: linear
bRelative Optional: If this is true, pos is relative to the current virtual size, otherwise it's an absolute virtual size. Default: false
bCancelOp Optional: If this is true, all other pending SetVirtSize operations are cancelled. Default: true
</item>
<item name="SetAlignment">
Set the window alignment relative to its parent. - Usage: Window.SetAlignment(alignment, start, duration, tweenfunc, bRelative);
alignment An array (l,t,r,b) containing the new alignment of the window
start Optional: How many milliseconds from now to start changing. Default: 0
duration Optional: How long (milliseconds) to change for. Default: 0
tweenfunc Optional: How to change - options are linear, linear_accel, linear_decel, linear_smooth, and linear_bounce. Default: linear
bRelative Optional: If this is true, alignment is relative to the current alignment. Otherwise it's absolute. Default: false
</item>
<item name="SetOffset">
Set the window offset from it's alignment. - Usage: Window.SetOffset(offset, start, duration, tweenfunc, bRelative);
offset An array (l,t,r,b) containing the new offset of the window
start Optional: How many milliseconds from now to start changing. Default: 0
duration Optional: How long (milliseconds) to change for. Default: 0
tweenfunc Optional: How to change - options are linear, linear_accel, linear_decel, linear_smooth, and linear_bounce. Default: linear
bRelative Optional: If this is true, offset is relative to the current offset. Otherwise it's absolute. Default: false
</item>
<item name="DestroyWindow">
Destroy a window. - Usage: Window.DestroyWindow(when);
when Optional: When, in ms from now, should we destroy it? Default: 0
</item>
<item name="Enable">
Enable the window to recieve input. - Usage: Window.Enable(when);
when Optional: When, in ms from now, to start accepting input. Default: 0
</item>
<item name="Disable">
Disable the window from recieving input. - Usage: Window.Disable(when);
when Optional: When, in ms from now, to stop accepting input. Default: 0
</item>
<item name="SetInputFocus">
Set the input focus to the window. - Usage: Window.SetInputFocus();
</item>
<item name="HasInputFocus">
Does the window have input focus? - Usage: Window.HasInputFocus();
Return value: true if the window has input focus, false otheriwise.
</item>
<item name="Show">
Make the window visable. - Usage: Window.Show(when);
when Optional: When, in ms from now, should we make the window visible. Default: 0
</item>
<item name="Hide">
Make the window hidden. - Usage: Window.Hide(when);
when Optional: When, in ms from now, should we make the window hidden. Default: 0
</item>
<item name="SetZOrder">
Change the window's z order. - Usage: Window.SetZOrder(where, when);
where The new position of the window. This can be one of the following:"top" or"bottom" (meaning above or below all siblings) or"top-most" or"bottom-most" (meaning above or below everything)
when Optional: When, in ms from now, to change the window's z-order.
</item>
<item name="SetZOrderRelative">
Change the window's z order in relation to the given window. - Usage: Window.SetZOrderRelative(where, who, when);
where The new position of the window. This can be one of the following:"top" or"bottom" (meaning above or below the given window)
who The window to put the given window above or below
when Optional: When, in ms from now, to change the window's z-order.
</item>
<item name="StartSize">
Start sizing the window, as though the user did so. - Usage: Window.StartSize(sizetype, mousepoint, button);
sizetype (string) of the set {"IH_LEFT","IH_TOPLEFT","IH_TOP","IH_TOPRIGHT","IH_RIGHT","IH_BOTTOMRIGHT","IH_BOTTOM","IH_BOTTOMLEFT" }
mousepoint (array) {x,y} giving pointer location to start the size.
button (string) of the set {"MBUTTON_LEFT","MBUTTON_MIDDLE","MBUTTON_RIGHT" }
</item>
<item name="StartDrag">
Start dragging the window, as though the user did so. - Usage: Window.StartDrag(dragtype, mousepoint, button);
dragtype (string) of the set {"DRAG","DRAGX","DRAGY" }
mousepoint (array) {x,y} giving pointer location to start the drag.
button (string) of the set {"MBUTTON_LEFT","MBUTTON_MIDDLE","MBUTTON_RIGHT" }
Set a window's Always-On-Top state - Usage: Window.SetAlwaysOnTop(bOnTop);
bOnTop True means parent window always on top, false means normal z-order.
</item>
<item name="StartIntro">
Broadcast Intro event to all children - Usage: Window.StartIntro(duration);
duration Optional: How long to animate for, in milliseconds. Default: 1000, or current settings
</item>
<item name="StartExtro">
Broadcast Extro event to all children - Usage: Window.StartExtro(duration);
duration Optional: How long to animate for, in milliseconds. Default: 1000, or current settings
</item>
<item name="GetAnimationDuration">
Returns the system-wide number of milliseconds that animations (i.e. intro, extro) should run for. - Usage: Window.GetAnimationDuration();
Return value: The time, in milliseconds, that animations should run for.
</item>
<item name="SetAngle">
Set the angle for a window. Angle-aware imagestyle elements will rotate - Usage: Window.SetAngle(angle, start, duration, tweenfunc, bCancelOp);
angle The angle, in degrees.
start Optional: How many milliseconds from now to start changing. Default: 0
duration Optional: How long (milliseconds) to change for. Default: 0
tweenfunc Optional: How to change - options are linear, linear_accel, linear_decel, linear_smooth, and linear_bounce. Default: linear
bCancelOp Optional: Cancel other pending operations of the same type Default: true
</item>
<item name="SetAnimTime">
Set the Animation time for a window. Animation time aware imagestyle elements will animate - Usage: Window.SetAnimTime(t, start, duration, tweenfunc, bCancelOp);
Examples:
- SetAnimTime(.5) immediately jumps to halfway through the animation.
- SetAnimTime(1.5, 0, 1000) takes one second to animate from whatever position it is currently at (halfway through if called right after the first example), through the end of the animation, and back to halfway through again.
- SetAnimTime(-1, 0, 1000) takes one second to animate from whatever position it is currently at, backwards through to the initial position.
- Calling SetAnimTime(0), SetAnimTime(10, 0, 1000), and SetAnimTime(0, 1000, 1000) in succession will cause the window to start at the beginning, animate 10 times forwards, then 10 times backwards.
t Percentage of the animation to run through. (.5 is half an animation, 1 is one complete interation, -2 is two complete iterations in reverse). Each window remembers what its last 't' position was, and the next call to SetAnimTime() starts from that position and animates forwards or backwards to the next 't' position.
start Optional: How many milliseconds from now to start changing. Default: 0
duration Optional: How long (milliseconds) to change for. Default: 0
tweenfunc Optional: How to change - options are linear, linear_accel, linear_decel, linear_smooth, and linear_bounce. Default: linear
bCancelOp Optional: Cancel other pending operations of the same type Default: true
</item>
<item name="SetZoom">
Set the zoom for a window. Zoom aware imagestyle elements will zoom - Usage: Window.SetZoom(magnification, start, duration, tweenfunc, bCancelOp);
magnification The zoom factor..
start Optional: How many milliseconds from now to start changing. Default: 0
duration Optional: How long (milliseconds) to change for. Default: 0
tweenfunc Optional: How to change - options are linear, linear_accel, linear_decel, linear_smooth, and linear_bounce. Default: linear
bCancelOp Optional: Cancel other pending operations of the same type Default: true
</item>
<item name="SetOpacity">
Set the opacity for a window. - Usage: Window.SetOpacity(opacity, start, duration, tweenfunc, bCancelOp);
opacity The opacity, from 0 to 1.
start Optional: How many milliseconds from now to start changing. Default: 0
duration Optional: How long (milliseconds) to change for. Default: 0
tweenfunc Optional: How to change - options are linear, linear_accel, linear_decel, linear_smooth, and linear_bounce. Default: linear
bCancelOp Optional: Cancel other pending operations of the same type Default: true
</item>
<item name="GetAngle">
Get the current angle for a window. - Usage: Window.GetAngle();
Return value: The current angle, in degrees
</item>
<item name="GetZoom">
Get the current zoom for a window. - Usage: Window.GetZoom();
Return value: The current zoom factor
</item>
<item name="GetOpacity">
Get the current opacity for a window. - Usage: Window.GetOpacity();
Return value: The current opacity, in the range of 0 to 1.
</item>
<item name="GetAnimTime">
Get the current animation time for a window. - Usage: Window.GetAnimTime();
Return value: The current time into the animations, in ms
</item>
<item name="GetHoverHint">
Get the hover hint for a window. - Usage: Window.GetHoverHint();
Return value: The window's hover hint.
</item>
<item name="SetHoverHint">
Set the hover hint for a window. - Usage: Window.SetHoverHint(hint);
hint The new hover hint. If of the format "Lang://module/key", it will be loaded out of the language file. Otherwise, it is used directly.
</item>
<item name="GetMouseLocation">
Retrieve the mouse location. - Usage: Window.GetMouseLocation();
Return value: An array (x,y) containing the location of the mouse (relative to this window).
</item>
<item name="GetMinimized">
Get the minimized state of the parent window. - Usage: Window.GetMinimized();
Return value: True if minimized, false if restored.
</item>
<item name="GetAlwaysOnTop">
Get the always-on-top state of the parent window. - Usage: Window.GetAlwaysOnTop();
Return value: True if always on top, false if normal.
</item>
<item name="PostScript">
Execute a script after all pending GUI events have completed. - Usage: Window.PostScript(script);
script What to execute when all pending GUI events are done.
</item>
<item name="SetImageStyle">
Set the named imagestyle to the specified style. This is designed to allow you to change the defined imagestyles of a window on the fly. For example: 'background,' 'state0,' 'barfilled,' etc. - Usage: Window.SetImageStyle(name, style);
name The name of the imagestyle you'd like to change
style The style you want to change the named style to
</item>
</section>
<section name="textdisplay">
<item name="GetText">
Get the display text. - Usage: TextDisplay.GetText();
</item>
<item name="SetText">
Set the display text. - Usage: TextDisplay.SetText(text);
text The text to set it to.
</item>
</section>
<section name="timer">
<item name="SetTimer">
Set a timer. - Usage: timer.SetTimer(name, interval, script, context, repeat);
This removes any other timer associated with the specified object that has the same name.
name The name of the timer, for furture reference
interval How long, in milliseconds, before the timer is triggered
script What to do when the timer is triggered
context What object to run the script in, when the timer is triggered.
repeat Optional: Boolean: Should the timer reset itself when it is triggered? Default: false
</item>
<item name="UnsetTimer">
Remove a previously set timer. - Usage: timer.UnsetTimer(name, context);