Difference between revisions of "MJAutomation"
Line 2: | Line 2: | ||
==Functions== | ==Functions== | ||
===MJPlaybackAutomation * GetPlayback()=== | ===MJPlaybackAutomation * GetPlayback()=== | ||
− | '''Description:''' gets a MJPlaybackAutomation interface | + | '''Description:''' gets a [[MJPlaybackAutomation]] interface<br> |
− | '''Return Value:''' MJPlaybackAutomation interface | + | '''Return Value:''' [[MJPlaybackAutomation]] interface |
===MJFilesAutomation * Search(string strSearch)=== | ===MJFilesAutomation * Search(string strSearch)=== | ||
− | '''Description:''' gets a MJFilesAutomation interface | + | '''Description:''' gets a [[MJFilesAutomation]] interface for the files matching the specified search<br> |
'''Parameters:''' | '''Parameters:''' | ||
* '''strSearch''': the search string to use... can be any search accepted by Media Center | * '''strSearch''': the search string to use... can be any search accepted by Media Center | ||
− | '''Return Value:''' MJFilesAutomation interface | + | '''Return Value:''' [[MJFilesAutomation]] interface |
===MJCurPlaylistAutomation * GetCurPlaylist()=== | ===MJCurPlaylistAutomation * GetCurPlaylist()=== | ||
− | '''Description:''' gets a MJCurPlaylistAutomation interface | + | '''Description:''' gets a [[MJCurPlaylistAutomation]] interface<br> |
− | '''Return Value:''' MJCurPlaylistAutomation interface | + | '''Return Value:''' [[MJCurPlaylistAutomation]] interface |
===MJPlaylistsAutomation * GetPlaylists()=== | ===MJPlaylistsAutomation * GetPlaylists()=== | ||
− | '''Description:''' gets a MJPlaylistsAutomation interface | + | '''Description:''' gets a [[MJPlaylistsAutomation]] interface for all of the existing playlists<br> |
− | '''Return Value:''' MJPlaylistsAutomation interface | + | '''Return Value:''' [[MJPlaylistsAutomation]] interface |
===MJSchemeAutomation * GetViewScheme(string strPath)=== | ===MJSchemeAutomation * GetViewScheme(string strPath)=== | ||
− | '''Description:''' gets a MJSchemeAutomation interface | + | '''Description:''' gets a [[MJSchemeAutomation]] interface for the given library path <br> |
'''Parameters:''' | '''Parameters:''' | ||
* '''strPath''': the path to the view scheme delimited by backslashes. (i.e. "Media Library\Artist/Album\Metallica") | * '''strPath''': the path to the view scheme delimited by backslashes. (i.e. "Media Library\Artist/Album\Metallica") | ||
− | '''Return Value:''' MJSchemeAutomation interface | + | '''Return Value:''' [[MJSchemeAutomation]] interface |
===MJMixerAutomation * GetMJMixer()=== | ===MJMixerAutomation * GetMJMixer()=== | ||
− | '''Description:''' gets a MJMixerAutomation interface | + | '''Description:''' gets a [[MJMixerAutomation]] interface<br> |
− | '''Return Value:''' MJMixerAutomationinterface | + | '''Return Value:''' [[MJMixerAutomationinterface]] |
===MJVersionAutomation * GetVersion()=== | ===MJVersionAutomation * GetVersion()=== | ||
− | '''Description:''' gets a MJVersionAutomation interface | + | '''Description:''' gets a [[MJVersionAutomation]] interface.<br> |
− | '''Return Value:''' MJVersionAutomation interface | + | '''Return Value:''' [[MJVersionAutomation]] interface |
===MJFileAutomation * GetFile(string strFilename)=== | ===MJFileAutomation * GetFile(string strFilename)=== | ||
− | '''Description:''' gets a MJFileAutomation interface | + | '''Description:''' gets a [[MJFileAutomation]] interface for the given file.<br> |
'''Parameters:''' | '''Parameters:''' | ||
* '''strFilename''': the path to the file. | * '''strFilename''': the path to the file. | ||
− | '''Return Value:''' MJFileAutomation interface | + | '''Return Value:''' [[MJFileAutomation]] interface |
===void EnableSkinning(number bEnable)=== | ===void EnableSkinning(number bEnable)=== | ||
Line 51: | Line 51: | ||
===MJInternetAutomation * GetInternet()=== | ===MJInternetAutomation * GetInternet()=== | ||
− | '''Description:''' gets a MJInternetAutomation interface | + | '''Description:''' gets a [[MJInternetAutomation]] interface.<br> |
− | '''Return Value:''' MJInternetAutomation interface | + | '''Return Value:''' [[MJInternetAutomation]] interface |
===number GetSkinInfo(string strItem, string strAttribute)=== | ===number GetSkinInfo(string strItem, string strAttribute)=== | ||
Line 69: | Line 69: | ||
===MJViewItemAutomation * GetViewItem(string strPath)=== | ===MJViewItemAutomation * GetViewItem(string strPath)=== | ||
− | '''Description:''' gets a MJViewItemAutomation interface | + | '''Description:''' gets a [[MJViewItemAutomation]] interface for the given file.<br> |
'''Parameters:''' | '''Parameters:''' | ||
* '''strPath''': the path to a view item. | * '''strPath''': the path to a view item. | ||
− | '''Return Value:''' MJViewItemAutomation interface | + | '''Return Value:''' [[MJViewItemAutomation]] interface |
===number GetWindowHandle()=== | ===number GetWindowHandle()=== | ||
Line 79: | Line 79: | ||
===MJFileAutomation * GetFileByKey(number nKey)=== | ===MJFileAutomation * GetFileByKey(number nKey)=== | ||
− | '''Description:''' gets a MJFileAutomation interface | + | '''Description:''' gets a [[MJFileAutomation]] interface for the file denoted by the key.<br> |
'''Parameters:''' | '''Parameters:''' | ||
* '''nKey''': the key of a file. | * '''nKey''': the key of a file. | ||
− | '''Return Value:''' MJFileAutomation interface | + | '''Return Value:''' [[MJFileAutomation]] interface |
===void ShowProgram(number bShow)=== | ===void ShowProgram(number bShow)=== | ||
Line 93: | Line 93: | ||
'''Parameters:''' | '''Parameters:''' | ||
* '''strFilename''': the path to the file. | * '''strFilename''': the path to the file. | ||
− | '''Return Value:''' MJFileAutomation interface | + | '''Return Value:''' [[MJFileAutomation]] interface |
===void SetGlobalFocusedWindow(number hwndNew, number bInvalidateNew)=== | ===void SetGlobalFocusedWindow(number hwndNew, number bInvalidateNew)=== | ||
Line 102: | Line 102: | ||
===MJFieldsAutomation * GetFields()=== | ===MJFieldsAutomation * GetFields()=== | ||
− | '''Description:''' gets a MJFieldsAutomation interface | + | '''Description:''' gets a [[MJFieldsAutomation]] interface<br> |
− | '''Return Value:''' MJFieldsAutomation interface | + | '''Return Value:''' [[MJFieldsAutomation]] interface |
===MJZonesAutomation * GetZones()=== | ===MJZonesAutomation * GetZones()=== | ||
− | '''Description:''' gets a MJZonesAutomation interface | + | '''Description:''' gets a [[MJZonesAutomation]] interface<br> |
− | '''Return Value:''' MJZonesAutomation interface | + | '''Return Value:''' [[MJZonesAutomation]] interface |
===MJFilesAutomation * CreateFiles()=== | ===MJFilesAutomation * CreateFiles()=== | ||
− | '''Description:''' gets a MJFilesAutomation interface | + | '''Description:''' gets a [[MJFilesAutomation]] interface with no files<br> |
− | '''Return Value:''' MJFilesAutomation interface | + | '''Return Value:''' [[MJFilesAutomation]] interface |
===MJTaskAutomation * GetTask(string strTask)=== | ===MJTaskAutomation * GetTask(string strTask)=== | ||
− | '''Description:''' gets a MJTaskAutomation interface | + | '''Description:''' gets a [[MJTaskAutomation]] interface. <br> |
'''Parameters:''' | '''Parameters:''' | ||
* '''strTask''': the name of the task. | * '''strTask''': the name of the task. | ||
− | '''Return Value:''' MJTaskAutomation interface | + | '''Return Value:''' [[MJTaskAutomation]] interface |
===MJServicesAutomation * GetServices()=== | ===MJServicesAutomation * GetServices()=== | ||
− | '''Description:''' gets a MJServicesAutomation interface | + | '''Description:''' gets a [[MJServicesAutomation]] interface. <br> |
− | '''Return Value:''' MJServicesAutomation interface | + | '''Return Value:''' [[MJServicesAutomation]] interface |
===void ReportEvent(string Name, string Data)=== | ===void ReportEvent(string Name, string Data)=== | ||
Line 133: | Line 133: | ||
'''Parameters:''' | '''Parameters:''' | ||
* '''nID''': the ID of the playlist | * '''nID''': the ID of the playlist | ||
− | '''Return Value:''' MJPlaylistAutomation interface (see below) | + | '''Return Value:''' [[MJPlaylistAutomation]] interface (see below) |
===void RegisterWindowWithRouter(number hwndRegister, number nRegisterState)=== | ===void RegisterWindowWithRouter(number hwndRegister, number nRegisterState)=== | ||
Line 143: | Line 143: | ||
===IMJCDDVDAutomation *GetCDDVD()=== | ===IMJCDDVDAutomation *GetCDDVD()=== | ||
'''Description:''' Gets a CD/DVD Automation interface<br> | '''Description:''' Gets a CD/DVD Automation interface<br> | ||
− | '''Return Value:''' MJCDDVDAutomation Interface | + | '''Return Value:''' [[MJCDDVDAutomation]] Interface |
==Properties== | ==Properties== | ||
===number IVersion() (read only)=== | ===number IVersion() (read only)=== | ||
'''Description:''' retrieves version of MC Automation interface. (2 is current version)<br> | '''Description:''' retrieves version of MC Automation interface. (2 is current version)<br> |
Revision as of 11:42, 23 January 2007
core object... provides access to all other objects
Contents
- 1 Functions
- 1.1 MJPlaybackAutomation * GetPlayback()
- 1.2 MJFilesAutomation * Search(string strSearch)
- 1.3 MJCurPlaylistAutomation * GetCurPlaylist()
- 1.4 MJPlaylistsAutomation * GetPlaylists()
- 1.5 MJSchemeAutomation * GetViewScheme(string strPath)
- 1.6 MJMixerAutomation * GetMJMixer()
- 1.7 MJVersionAutomation * GetVersion()
- 1.8 MJFileAutomation * GetFile(string strFilename)
- 1.9 void EnableSkinning(number bEnable)
- 1.10 void SkinWindow(number nWindowHandle, boolean bSkin)
- 1.11 MJInternetAutomation * GetInternet()
- 1.12 number GetSkinInfo(string strItem, string strAttribute)
- 1.13 number IsPurchased()
- 1.14 MJViewItemAutomation * GetViewItem(string strPath)
- 1.15 number GetWindowHandle()
- 1.16 MJFileAutomation * GetFileByKey(number nKey)
- 1.17 void ShowProgram(number bShow)
- 1.18 MJFileAutomation * ImportFile(string strFilename)
- 1.19 void SetGlobalFocusedWindow(number hwndNew, number bInvalidateNew)
- 1.20 MJFieldsAutomation * GetFields()
- 1.21 MJZonesAutomation * GetZones()
- 1.22 MJFilesAutomation * CreateFiles()
- 1.23 MJTaskAutomation * GetTask(string strTask)
- 1.24 MJServicesAutomation * GetServices()
- 1.25 void ReportEvent(string Name, string Data)
- 1.26 IMJPlaylistAutomation *GetPlaylistByID(number nID)
- 1.27 void RegisterWindowWithRouter(number hwndRegister, number nRegisterState)
- 1.28 IMJCDDVDAutomation *GetCDDVD()
- 2 Properties
Functions
MJPlaybackAutomation * GetPlayback()
Description: gets a MJPlaybackAutomation interface
Return Value: MJPlaybackAutomation interface
MJFilesAutomation * Search(string strSearch)
Description: gets a MJFilesAutomation interface for the files matching the specified search
Parameters:
- strSearch: the search string to use... can be any search accepted by Media Center
Return Value: MJFilesAutomation interface
MJCurPlaylistAutomation * GetCurPlaylist()
Description: gets a MJCurPlaylistAutomation interface
Return Value: MJCurPlaylistAutomation interface
MJPlaylistsAutomation * GetPlaylists()
Description: gets a MJPlaylistsAutomation interface for all of the existing playlists
Return Value: MJPlaylistsAutomation interface
MJSchemeAutomation * GetViewScheme(string strPath)
Description: gets a MJSchemeAutomation interface for the given library path
Parameters:
- strPath: the path to the view scheme delimited by backslashes. (i.e. "Media Library\Artist/Album\Metallica")
Return Value: MJSchemeAutomation interface
MJMixerAutomation * GetMJMixer()
Description: gets a MJMixerAutomation interface
Return Value: MJMixerAutomationinterface
MJVersionAutomation * GetVersion()
Description: gets a MJVersionAutomation interface.
Return Value: MJVersionAutomation interface
MJFileAutomation * GetFile(string strFilename)
Description: gets a MJFileAutomation interface for the given file.
Parameters:
- strFilename: the path to the file.
Return Value: MJFileAutomation interface
void EnableSkinning(number bEnable)
Description: Enables and disabled Media Center skinning. Useful in case when MC could not skin plug-in window correctly.
Parameters:
- bEnable: TRUE - enable skinning, FALSE - disable.
void SkinWindow(number nWindowHandle, boolean bSkin)
Description: Skins or removes skinning from the specified window.
Parameters:
- nWindowHandle: handle to the specific window (convert HWND to long)
- bSkin: TRUE - enables skinning of the specified window, FALSE - disables skinning for the window.
MJInternetAutomation * GetInternet()
Description: gets a MJInternetAutomation interface.
Return Value: MJInternetAutomation interface
number GetSkinInfo(string strItem, string strAttribute)
Description: Retrieves information about current skin.
Parameters:
- strItem: item name
- strAttribute: attribute name.
Return Value: value of the specified skin item. -1 if the info was not found.
Examples:
GetSkinInfo("Tree", "TextColor"); GetSkinInfo("StatusBar", "BackColor");
number IsPurchased()
Description: Retrieves registration information
Return Value: if Media Center is purchased return value will be -1. The value will be equal to 0 if trial period expired but the program was not purchased. If the value > 0 the function returned number of days left in the trial period.
MJViewItemAutomation * GetViewItem(string strPath)
Description: gets a MJViewItemAutomation interface for the given file.
Parameters:
- strPath: the path to a view item.
Return Value: MJViewItemAutomation interface
number GetWindowHandle()
Description: Retrieves handle to Media Center's main window
Return Value: HWND to main application window.
MJFileAutomation * GetFileByKey(number nKey)
Description: gets a MJFileAutomation interface for the file denoted by the key.
Parameters:
- nKey: the key of a file.
Return Value: MJFileAutomation interface
void ShowProgram(number bShow)
Description: Changes visibility state of the program.
Parameters:
- bShow: 1 - show the app, 0 - hide.
MJFileAutomation * ImportFile(string strFilename)
Description: imports a new file into Media Center
Parameters:
- strFilename: the path to the file.
Return Value: MJFileAutomation interface
void SetGlobalFocusedWindow(number hwndNew, number bInvalidateNew)
Description: Sets the focus to the new window.
Parameters:
- hwndNew: the handle of the window
- bInvalidateNew: Invalidate the new window so it knows the focus changed
MJFieldsAutomation * GetFields()
Description: gets a MJFieldsAutomation interface
Return Value: MJFieldsAutomation interface
MJZonesAutomation * GetZones()
Description: gets a MJZonesAutomation interface
Return Value: MJZonesAutomation interface
MJFilesAutomation * CreateFiles()
Description: gets a MJFilesAutomation interface with no files
Return Value: MJFilesAutomation interface
MJTaskAutomation * GetTask(string strTask)
Description: gets a MJTaskAutomation interface.
Parameters:
- strTask: the name of the task.
Return Value: MJTaskAutomation interface
MJServicesAutomation * GetServices()
Description: gets a MJServicesAutomation interface.
Return Value: MJServicesAutomation interface
void ReportEvent(string Name, string Data)
Description: Reports an event.
Parameters:
- Name: the name of the event
- Data: extra data.
IMJPlaylistAutomation *GetPlaylistByID(number nID)
Description: Gets a playlist
Parameters:
- nID: the ID of the playlist
Return Value: MJPlaylistAutomation interface (see below)
void RegisterWindowWithRouter(number hwndRegister, number nRegisterState)
Description: Register or unregister a window with the router
Parameters:
- hwndRegister: Handle of the window to register
- nRegisterState: TRUE for register, FALSE for unregister
IMJCDDVDAutomation *GetCDDVD()
Description: Gets a CD/DVD Automation interface
Return Value: MJCDDVDAutomation Interface
Properties
number IVersion() (read only)
Description: retrieves version of MC Automation interface. (2 is current version)