## sonique

eq

GetNumBands

    How many bands the equalizer is configured to use - Usage: equalizer.GetNumBands();
           Return value:   The number of bands in the current configuration

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.

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.

SetEQData

    Set the equalizer gain settings. - Usage: equalizer.SetEQData(banddata);
           banddata        An array of gain data, one value for each equalizer band.

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

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..

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.

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.

Reset

    Reset the equalizer to flat (no equalization). - Usage: equalizer.Reset();

pab

GetPitch

    Get the pitch setting - Usage: pitchampbal.GetPitch();
           Return value:   The pitch setting, in the range 0.125 to 8.0

GetAmplification

    Get the amplification setting - Usage: pitchampbal.GetAmplification();
           Return value:   The amplification setting, in the range 0.125 to 8.0

GetBalance

    Get the balance setting - Usage: pitchampbal.GetBalance();
           Return value:   The balance setting, in the range -1.0 to 1.0

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

SetAmplification

    Set the amplification setting - Usage: pitchampbal.SetAmplification(gain);
           gain            The gain to set in the range of 0.125 to 8.0

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)

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.

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.

ID3Editor

GetTags

    Get the ID3 tags from a file - Usage: ID3Editor.GetTags(URL);
           URL             the file location - like 'C:/audio/artist - title.mp3'
           Return value:   an array of ID3 information

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:   'set' if success

files

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

UnregisterFileAssociation

    Unregister a file extention for Sonique2 - Usage: files.UnregisterFileAssociation(ext);
           ext             The extention to unregister

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

playlists

AddPlaylist

    Add a playlist - Usage: playlists.AddPlaylist(name);
           name            The name of the playlist to add.
           Return value:   'done' on success

RemovePlaylist

    Remove a playlist - Usage: playlists.RemovePlaylist(name);
           name            The name of the playlist to remove.
           Return value:   'done' on success

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

GetPlaylistList

    Retrieve a list of playlists - Usage: playlists.GetPlaylistList();
           Return value:   An array of playlist objects.

GetPlaylist

    Get the specified playlist - Usage: playlists.GetPlaylist(name);
           name            the name of the playlist
           Return value:   the playlist object's UID

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)

CombinePlaylists

    Merge playlists - Usage: playlists.CombinePlaylists(dest, source, bAppend);
           dest            The playlist to merge into
           source          The playlist to merge from
           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)

SetIdleScan

    Configure the playlist idle scan - Usage: playlists.SetIdleScan(mode);
           mode            One of the following:  'none' 'quick' or 'thorough'

players

AddPlayer

    Add a player - Usage: players.AddPlayer(name);
           name            The name of the player to add.
           Return value:   'done' on success

RemovePlayer

    Remove a player - Usage: players.RemovePlayer(name);
           name            The name of the player to remove.
           Return value:   'done' on success

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

GetPlayerList

    Retrieve a list of players - Usage: players.GetPlayerList();
           Return value:   An array of player objects.

GetPlayer

    Get the specified player - Usage: players.GetPlayer(name);
           name            the name of the player
           Return value:   the player object's UID

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)

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)

GetDefaultEndpoint

    What is the default output device? - Usage: players.GetDefaultEndpoint();
           Return value:   The name of the default endpoing (output device)

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)

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'.

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'.

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'.

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'.

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'.

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'.

playlist

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

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.

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

RemoveAll

    Remove all items from the playlist. - Usage: playlist.RemoveAll();
           Return value:   'removed' on success, null on error

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

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.

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.

Reshuffle

    Reshuffle the playlist. - Usage: playlist.Reshuffle();

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

AdvancedSort

    Sort the playlist by multiple fields. - Usage: playlist.AdvancedSort(criterion1, criterion2, ...);

    The following code will sort by a few fields:
    :sonique.playlists.default.AdvancedSort({"artist", "forwards"},{"year", "reverse"},{"album"},{"track"},{"title"});
    Keep in mind sorting is an expensive operation.
           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

Randomize

    Randomize the order of the playlist - Usage: playlist.Randomize();
           Return value:   'randomized' on success, otherwise null.

Reverse

    Reverse the order of the playlist - Usage: playlist.Reverse();
           Return value:   'reversed' on success, otherwise null.

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.

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

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.

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

GetCurrentList

    Retrieves the playlist as an array of UIDs - Usage: playlist.GetCurrentList();
           Return value:   An array of UIDs currently in the playlist.

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')

GetCount

    How many items are in the playlist? - Usage: playlist.GetCount();
           Return value:   The number of items in the playlist

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

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.

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.

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

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)

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)

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.

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)

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

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

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

StartIdleScan

    Forces the idle scan to start (in case it's not set to start immediately) - Usage: playlist.StartIdleScan();

StopIdleScan

    Forces the idle scan to stop - Usage: playlist.StopIdleScan();

CurrentlyIdleScanning

    Are we currently idle scanning? - Usage: playlist.CurrentlyIdleScanning();
           Return value:   true if we are, false if we aren't.

IdleScanningIsActive

    Is the idle scan thread actively scanning files? - Usage: playlist.IdleScanningIsActive();
           Return value:   true if we are, false if we aren't.

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

player

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.

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.

Stop

    If the player is playing or paused, stop. - Usage: player.Stop();
           Return value:   'Stopped' if we stopped, null if we were already stopped.

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.

TogglePause

    If playing, pause. If paused, play. - Usage: player.TogglePause();

IsPlaying

    Query whether the player is not stopped. - Usage: player.IsPlaying();
           Return value:   true if it is playing, false if it isn't.

IsPaused

    Query whether the player is not paused. - Usage: player.IsPaused();
           Return value:   true if it is paused, false if it isn't.

Next

    Skip to the next track in the playlist (in accordance with shuffle and what not) - Usage: player.Next();

Previous

    Skip to the previous track in the playlist (in accordance with shuffle and what not) - Usage: player.Previous();

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

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

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

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

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).

GetPlayProgress

    Query the estimated amount of time through the playlist we're at. - Usage: player.GetPlayProgress();

GetShuffle

    Query whether shuffle play is enabled. - Usage: player.GetShuffle();
           Return value:   true if it is, false if it isn't.

SetShuffle

    Enable or disable shuffle play - Usage: player.SetShuffle(shuffle);
           shuffle         true to enable shuffle play, false to disable

ToggleShuffle

    Toggle shuffle play - Usage: player.ToggleShuffle();

GetRepeat

    Query repeat play is status. - Usage: player.GetRepeat();
           Return value:   'off', 'one', or 'all'

SetRepeat

    Change repeat mode - Usage: player.SetRepeat(repeat);
           repeat          'off', 'one', or 'all'

ToggleRepeat

    Advance through repeat settings 'off', 'one', and 'all. - Usage: player.ToggleRepeat();

GetVolume

    Get the current playback volume - Usage: player.GetVolume();
           Return value:   The volume, between 0.0 and 1.0

SetVolume

    Set the current playback volume. - Usage: player.SetVolume(vol);
           vol             A number between 0.0 (silence) and 1.0 (pretty loud)

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)

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

SetSaveStreams

    Enable or disable stream saving - Usage: player.SetSaveStreams(bSaveStreams);
           bSaveStreams    1 to start saving streams or 0 to stop.

GetSaveStreams

    Determine whether stream saving is enabled or disabled - Usage: player.GetSaveStreams();

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

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

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.

GetAssociatedPlaylist

    Get the UID of the playlist associated with this player - Usage: player.GetAssociatedPlaylist();
           Return value:   The UID, or if unavailabe, null

SetAssociatedPlaylist

    Set which playlist this player is playing from - Usage: player.SetAssociatedPlaylist(uid);
           uid             The UID of the playlist to use.

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.

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)

playersetting

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.

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.

player

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

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

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'

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'

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

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'

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'

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'

prefs

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.

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.

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.

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.

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.

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.

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

Save

    Force Sonique to write all preferences out to disk. This normally happens only on program shutdown. - Usage: prefs.Save();

sonique

InstallInterface

    Register a skin or interface. - Usage: :sonique.InstallInterface(path);
           path            The path to the interface.

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

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.

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.

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'

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

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

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.

SetLanguageIndex

    Select a single language, by index. - Usage: :sonique.SetLanguageIndex(index);
           index           The index of the language to select.  GetLanguageList() will show available languages.

GetLanguageList

    Enumerate available languages. - Usage: :sonique.GetLanguageList();
           Return value:   An array of languages that are at least partially available.

GetInterfaceList

    Enumerate available interfaces. - Usage: :sonique.GetInterfaceList();
           Return value:   An array of interfaces that are available.

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.
           MMLType         Type of >window< (eg. generic or button)
           MMLName         Name of >window< to get
           name            Name of the child to create
           offset          {left, top, right, bottom} - Window offset
           alignment       {left, top, right, bottom} - Window alignment
           context         Optional: The parent window for the new window.  Default: the calling object
           bVisible        Optional: Boolean - should the window be immediately visible  Default: true
           flags           Optional: Extra window flags  Default: 0
           bBelowParent    Optional: Should this window be below the parent? (useful for drawers and such)  Default: false
           MMLFlags        Optional: MML Create flags  Default: 0
           CreateChildren  Optional: Create all decendants?  Default: true
           FactoryID       Optional: MID of a factory to use to create this object  Default: loads from skin
           Return value:   UID on success, NULL otherwise

Status

    Set the status text bar of all windows - Usage: :sonique.Status(text, type);
           text            The text to set
           type            Optional: How to set it. Options include: 'fallback', 'info', 'warning', 'error'  Default: 'info'

LocalStatus

    Set the local status bar text - Usage: :sonique.LocalStatus(text, priority, context);
           text            The text to set
           priority        Optional: Options include: 'fallback', 'info', 'warning', 'error'  Default: 'info'
           context         Optional: The window to set the status text of.  Default: the calling object

StatusProportion

    Set the status bar to a slider-like value - Usage: :sonique.StatusProportion(text, proportion, text2, priority);
           text            The text to set
           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
           priority        Optional: Options include: 'fallback', 'info', 'warning', 'error'  Default: 'info'

LocalStatusProportion

    Set the local status bar text - Usage: :sonique.LocalStatusProportion(text, priority, proportion, text2, context);
           text            The text to set
           priority        Optional: Options include: 'fallback', 'info', 'warning', 'error'  Default: 'info'
           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

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

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)

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

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

LaunchSettingsPopup

    Launch a popup settings window. - Usage: :sonique.LaunchSettingsPopup();

LaunchID3EditPopup

    Launch a popup ID3 editor. - Usage: :sonique.LaunchID3EditPopup();

LaunchInterfaceBrowserPopup

    Launch a popup interface browser. - Usage: :sonique.LaunchInterfaceBrowserPopup();

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

LaunchHelp

    Launch the help window - Usage: :sonique.LaunchHelp(section);
           section         The section within help to start in (currently: 'index', 'about', 'hotkeys', or 'playlist')

RemoveInterface

    Unload an interface. - Usage: :sonique.RemoveInterface(The unique name of the interface to remove);
           The unique name of the interface to remove

RemoveInterfacePackage

    Unload all interfaces associated with a package - Usage: :sonique.RemoveInterfacePackage(package);
           package         The path of the package.

CompactMem

    Compact Memory.  Don't use lightly. - Usage: :sonique.CompactMem();

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.

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.

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.

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).

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.

GetKnobRadialControl

    Retrieve the knob's radial control status. - Usage: :sonique.GetKnobRadialControl();
           Return value:   false for up/down, left/right control, true for radial control

SetKnobSensitivity

    Set the knob sensitivity. - Usage: :sonique.SetKnobSensitivity(sensativity);
           sensativity     500 is the installation default.  Higher means faster knobs, lower means higher precision.

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.

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.

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

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.

Unscramble

    Unjumbles a previously scrambled string. - Usage: :sonique.Unscramble(string);
           string          Something that doesn't make sense.
           Return value:   Something that makes sense

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.

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.

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.

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.

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.

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.

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

URLEncode

    URL encode the given string - Usage: :sonique.URLEncode(string);
           string          The string to encode.
           Return value:   the encoded string

URLDecode

    URL decode the given string - Usage: :sonique.URLDecode(string);
           string          The string to decode.
           Return value:   the decoded string

GetExtension

    return the extension of the given path - Usage: :sonique.GetExtension(path);
           path            The path.
           Return value:   the extension

GetBaseName

    return the filename from the given path - Usage: :sonique.GetBaseName(path);
           path            The path.
           Return value:   the file name

GetDirName

    return the directory of the given path - Usage: :sonique.GetDirName(path);
           path            The path.
           Return value:   the directory

SetCdAutoPlay

    Sets sonique to auto-play CDs - Usage: :sonique.SetCdAutoPlay(bEnable);
           bEnable         True to enable, false to disable.

GetCdAutoPlay

    Gets sonique to auto-play CDs - Usage: :sonique.GetCdAutoPlay();
           Return value:   'true' if enabled, 'false' if disabled.

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

SetRemoveFromTaskbar

    todo - Usage: :sonique.SetRemoveFromTaskbar();

GetRemoveFromTaskbar

    todo - Usage: :sonique.GetRemoveFromTaskbar();

posteffects

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.

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

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.

visualsetting

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.

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

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.

visuals

GetVisualList

    Get a list of the IDs of all visuals currently loaded. - Usage: visuals.GetVisualList();
           Return value:   An array of IDs

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'

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'

LoadVisual

    Loads a visual into the visual system - Usage: visuals.LoadVisual(path);
           path            The filename of the visual to load

UnloadVisual

    Unload a visual from the visual system - Usage: visuals.UnloadVisual(which);
           which           The id or filename of the visual to unload

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

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

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

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

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

GetPostEffectList

    List the available posteffects - Usage: visuals.GetPostEffectList();
           Return value:   An array of arrays with the following fields:  'name', 'description', 'factoryID'

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

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

EqualizerWindow

UpdateDisplay

    Causes the equalizer control's data to be refreshed and redrawn - Usage: EqualizerWindow.UpdateDisplay();

UpdateBands

    Causes the equalizer control's gain data to be refreshed and redrawn - Usage: EqualizerWindow.UpdateBands();

playlistwin

GetAssociatedPlaylist

    Get the playlist associated with this control. - Usage: PlaylistWindow.GetAssociatedPlaylist();
           Return value:   The playlist

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.

GetCurrentItem

    Get the user's current item (where the cursor is) - Usage: PlaylistWindow.GetCurrentItem();
           Return value:   The playlist ID of the current item

SeturrentItem

    Move the current item (the cursor). - Usage: PlaylistWindow.SeturrentItem(id);
           id              The playlist UID of the item to move to.

GetSelectedItems

    Get the selected items - Usage: PlaylistWindow.GetSelectedItems();
           Return value:   An array of playlist UIDs of the selected items.

SetSelectedItems

    Set the list of selected items - Usage: PlaylistWindow.SetSelectedItems(items);
           items           An array of playlist UIDs to select.

ClearSelection

    De-select all selected items. - Usage: PlaylistWindow.ClearSelection();

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.

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'

GetAssociatedPlayer

    Get the name of the associated player. NB: if there is no associated player, this returns an empty string. - Usage: PlaylistWindow.GetAssociatedPlayer();

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

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.

RemoveColumn

    Remove the column from the playlist. - Usage: PlaylistWindow.RemoveColumn(id);
           id              the ID of the column to remove

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

interfaceswin

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

onlinewin

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

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

framewin

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).

SetMenuProperty

    Load the given property and refresh the menu's imagestyles. - Usage: FrameWindow.SetMenuProperty(name);
           name            the name of the property (like "SQ2_PopupMenu")

displaywindow

DisplayWindow

    Choose which window to show in the display - Usage: DisplayWindow.DisplayWindow(window);
           window          Which window to display

ToggleWindow

    Toggle a window in the display - Usage: DisplayWindow.ToggleWindow(window);
           window          Which window to toggle

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

VisWin

GetAssociatedPlayer

    Get the player from which this visual gets its data. - Usage: VisWin.GetAssociatedPlayer();
           Return value:   The name of the player

SetAssociatedPlayer

    Select a player to get data from. - Usage: VisWin.SetAssociatedPlayer(player);
           player          The name of the player to use.

GetVisualGroup

    Which visual group are we a memmber of - Usage: VisWin.GetVisualGroup();
           Return value:   The name of a visual group.

SetVisualGroup

    Which visual group should we be a member of? - Usage: VisWin.SetVisualGroup(group);
           group           The name of the visual group to join

NextVisual

    Go to the next visual in the list of loaded visuals. - Usage: VisWin.NextVisual();

PrevVisual

    Go to the previous visual in the list of loaded visuals. - Usage: VisWin.PrevVisual();

SetVisual

    Set the visual window to dispaly a specific visual. - Usage: VisWin.SetVisual(visual);
           visual          The id of the visual to display

GetVisual

    Which visual are we currently displaying? - Usage: VisWin.GetVisual();
           Return value:   The id of the visual

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.

FullScreenVis

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"

GetDeviceList

    Get Information about installed DirectDraw devices - Usage: FullScreenVis.GetDeviceList();
           Return value:   Array of arrays containing the following fields: 'id', 'name', 'description', 'GUID'

SetDisplayDevice

    Set the Device to use for DirectDraw operations - Usage: FullScreenVis.SetDisplayDevice(display);
           display         The GUID of the display to use.

GetDisplayDevice

    Get the Device to use for DirectDraw operations - Usage: FullScreenVis.GetDisplayDevice();
           Return value:   The GUID of the display

## mml

math

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
           Return value:   The truncated number

Power

    Exponentiation. - Usage: :math.Power(base, exponent);
           base            is the base for exponentiation.
           exponent        is the exponent
           Return value:   base ^ pow.

Log

    Logarithm. - Usage: :math.Log(base, value);
           base            is what base to take the log in.
           value           is whose logarithm is returned.
           Return value:   e, such that value = pow(base, e)

Abs

    Get the absolute value of a number. - Usage: :math.Abs(val);
           val             is the number.
           Return value:   The absolute (unsigned) value of a number

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

string

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

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.

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.

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.

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.

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.

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.

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.

clock

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

app

Exit

    Close all windows and Exit the application. - Usage: :app.Exit();

GetVersion

    Get the version string of Sonique - Usage: :app.GetVersion();
           Return value:   The version string

GetBuildTime

    Get the build time of this application. - Usage: :app.GetBuildTime();
           Return value:   The date and time this copy of the application was built.

GetAppName

    Get the name of the application. - Usage: :app.GetAppName();
           Return value:   The name of the application.

EnableKeyScripts

    Enable keyscripts (aka hotkeys) - Usage: :app.EnableKeyScripts(bEnable);
           bEnable         is a boolean value - true to enable, false to disable.

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

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

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

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

GetScreenDimensions

    Get an array of the screen dimensions (one entry pre device) - Usage: :app.GetScreenDimensions();

console

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

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

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".

data

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.

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.

ArraySize

    How large is an array? - Usage: $data.ArraySize();
           Return value:   the number of elements in $MyArray.

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.

base

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.

Funcs

    Enumerate functions. - Usage: Object.Funcs();
           Return value:   An array of the names of the functions which Object contains.

Help

    Retrieve help information. - Usage: Object.Help();
           Return value:   A description of Object's usage. Note that Object may be a function.

Children

    Enumerate children. - Usage: Object.Children();
           Return value:   An array of the names of the child objects which Object contains.

Members

    Enumerate members. - Usage: Object.Members();
           Return value:   An array of the names of the members (data) which Object contains.

All

    Enumerate everything. - Usage: Object.All();
           Return value:   An array of tne names of everything which Object contains.

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.

Name

    Ask an object its name. - Usage: Object.Name();
           Return value:   The name of the object.

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.

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.

consolewin

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'

button

GetHover

    Query a control's hover status. - Usage: Button.GetHover();
           Return value:   True, if the hover is enabled. False if hover is disabled.

SetHover

    Set a control's hover status. - Usage: Button.SetHover(bHoverState);
           bHoverState     True to enable mouse over hovering, false to disable it.

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.

GetButtonState

    Retrieve a button's state. - Usage: Button.GetButtonState();
           Return value:   The number of the state that is currently active for Button.

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.

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.

GetText

    Get the button's display text. - Usage: Button.GetText();

SetText

    Set the button's display text. - Usage: Button.SetText(string);
           string          The text to display on the button.

EditControl

GetText

    Retrieve an Edit control's contents. - Usage: (null).GetText();
           Return value:   The text contents of the Edit control.

SetText

    Set the contents of an Edit Control. - Usage: (null).SetText(text);
           text            What to set the edit control's contents to.

language

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

picker

GetCurrentItem

    Get the currently selected item. - Usage: Picker.GetCurrentItem();
           Return value:   The text contents of the currently selected item.

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.

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.

SetCurrentIndex

    Selects an item by index. - Usage: Picker.SetCurrentIndex(index);
           index           The numeric index of the item to set, beginning with 0.

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.

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.

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.

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.

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.

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.

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.

spinbutton

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

GetIntPos

    Get the spinner's integral position. - Usage: Spinner.GetIntPos();
           Return value:   A number between the min and max integer positions

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.

SetIntPos

    Set the spinner's position. - Usage: Spinner.SetIntPos(pos);
           pos             A number between the spinner's minimum and maximum values.

GetMin

    Get the spinner's mimimum integer position. - Usage: Spinner.GetMin();
           Return value:   The minimum value that spinner can hold.

GetMax

    Get the spinner's maximum integer position. - Usage: Spinner.GetMax();
           Return value:   The maximum value that spinner can hold.

selectionlist

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.

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.

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.

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.

GetSelectedIndexes

    Get the selected items - Usage: List.GetSelectedIndexes();
           Return value:   An array of the selected indeces in the selection list.

SetSelectedIndexes

    Set the list of selected indeces - Usage: List.SetSelectedIndexes(indexes);
           indexes         An array of the indeces of the items to select.

GetSelectedItems

    Get the selected items - Usage: List.GetSelectedItems();
           Return value:   An array of the names of the selected items in the selection list

SetSelectedItems

    Set the list of selected items - Usage: List.SetSelectedItems(items);
           items           An array of the names of the items to select.

ClearSelection

    De-select all selected items. - Usage: List.ClearSelection();

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.

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.

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.

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.

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.

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.

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.

slider

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

GetIntPos

    Get the slider's integral position. - Usage: Slider.GetIntPos();
           Return value:   A number between the min and max integer positions

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.

SetIntPos

    Set the slider's position. - Usage: Slider.SetIntPos(pos);
           pos             A number between the slider's minimum and maximum values.

GetMin

    Get the slider's mimimum integer position. - Usage: Slider.GetMin();
           Return value:   The minimum value that slider can hold.

GetMax

    Get the slider's maximum integer position. - Usage: Slider.GetMax();
           Return value:   The maximum value that Slider can hold.

SetMin

    Set the slider's minimum integer position. - Usage: Slider.SetMin(min);
           min             The new lower bound of the slider's range.

SetMax

    Set the slider's maximum integer position. - Usage: Slider.SetMax(max);
           max             The new upper bound of the slider's range.

window

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

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

GetDesiredFPS

    Retrieve the desired frame rate. - Usage: Window.GetDesiredFPS();
           Return value:   The desired frame rate, in Frames Per Second.

GetActualFPS

    Retrieve the actual frame rate. - Usage: Window.GetActualFPS();
           Return value:   The actual frame rate, in Frames Per Second.

SetDesiredFPS

    Set the desired frame rate. - Usage: Window.SetDesiredFPS(rate);
           rate            The desired frame rate, in Frames Per Second.

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)

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.

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.

GetSize

    Retrieve the window size. - Usage: Window.GetSize();
           Return value:   An array (x,y) containing the dimensions in pixels of the window.

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.

GetPan

    Retrieve the window size. - Usage: Window.GetPan();
           Return value:   An array (x,y) containing the location of the pan origin.

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

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

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

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

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

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

DestroyWindow

    Destroy a window. - Usage: Window.DestroyWindow(when);
           when            Optional: When, in ms from now, should we destroy it?   Default: 0

Enable

    Enable the window to recieve input. - Usage: Window.Enable(when);
           when            Optional: When, in ms from now, to start accepting input.   Default: 0

Disable

    Disable the window from recieving input. - Usage: Window.Disable(when);
           when            Optional: When, in ms from now, to stop accepting input.   Default: 0

SetInputFocus

    Set the input focus to the window. - Usage: Window.SetInputFocus();

HasInputFocus

    Does the window have input focus? - Usage: Window.HasInputFocus();
           Return value:   true if the window has input focus, false otheriwise.

Show

    Make the window visable. - Usage: Window.Show(when);
           when            Optional: When, in ms from now, should we make the window visible.   Default: 0

Hide

    Make the window hidden. - Usage: Window.Hide(when);
           when            Optional: When, in ms from now, should we make the window hidden.   Default: 0

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.

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.

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" }

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" }

CreateWindow

    Create a child window. - Usage: Window.CreateWindow(MMLType, MMLName, name, offset, alignment, bVisible, flags, bBelowParent, MMLFlags, CreateChildren, FactoryID);
           MMLType         Type of >window< (eg. generic or button)
           MMLName         Name of >window< to copy
           name            Name of the child to create
           offset          {left, top, right, bottom} - Window offset
           alignment       {left, top, right, bottom} - Window alignment
           bVisible        Optional: Boolean - should the window be immediately visible  Default: true
           flags           Optional: Extra window flags  Default: 0
           bBelowParent    Optional: Should this window be below the parent? (useful for drawers and such)  Default: false
           MMLFlags        Optional: MML Create flags  Default: 0
           CreateChildren  Optional: Create all decendants?  Default: true
           FactoryID       Optional: MID of a factory to use to create this object  Default: loads from skin
           Return value:   UID on success, NULL otherwise

MinimizeWindow

    Set a window's parent's minimized state - Usage: Window.MinimizeWindow(bMinimize);
           bMinimize       Boolean - true minimizes, false restores.

SetAlwaysOnTop

    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.

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

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

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.

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

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

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

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

GetAngle

    Get the current angle for a window. - Usage: Window.GetAngle();
           Return value:   The current angle, in degrees

GetZoom

    Get the current zoom for a window. - Usage: Window.GetZoom();
           Return value:   The current zoom factor

GetOpacity

    Get the current opacity for a window. - Usage: Window.GetOpacity();
           Return value:   The current opacity, in the range of 0 to 1.

GetAnimTime

    Get the current animation time for a window. - Usage: Window.GetAnimTime();
           Return value:   The current time into the animations, in ms

GetHoverHint

    Get the hover hint for a window. - Usage: Window.GetHoverHint();
           Return value:   The window's hover hint.

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.

GetMouseLocation

    Retrieve the mouse location. - Usage: Window.GetMouseLocation();
           Return value:   An array (x,y) containing the location of the mouse (relative to this window).

GetMinimized

    Get the minimized state of the parent window. - Usage: Window.GetMinimized();
           Return value:   True if minimized, false if restored.

GetAlwaysOnTop

    Get the always-on-top state of the parent window. - Usage: Window.GetAlwaysOnTop();
           Return value:   True if always on top, false if normal.

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.

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

textdisplay

GetText

    Get the display text. - Usage: TextDisplay.GetText();

SetText

    Set the display text. - Usage: TextDisplay.SetText(text);
           text            The text to set it to.

timer

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

UnsetTimer

    Remove a previously set timer. - Usage: timer.UnsetTimer(name, context);
           name            The name of the timer to remove
           context         The object the timer is associated with