MJAutomation

From wiki.jriver.com
Revision as of 23:33, 22 January 2007 by Gateley (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

core object... provides access to all other objects

Functions

MJPlaybackAutomation * GetPlayback()

Description: gets a MJPlaybackAutomation interface (see below)
Return Value: MJPlaybackAutomation interface

MJFilesAutomation * Search(string strSearch)

Description: gets a MJFilesAutomation interface (see below) 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 (see below)
Return Value: MJCurPlaylistAutomation interface

MJPlaylistsAutomation * GetPlaylists()

Description: gets a MJPlaylistsAutomation interface (see below) for all of the existing playlists
Return Value: MJPlaylistsAutomation interface

MJSchemeAutomation * GetViewScheme(string strPath)

Description: gets a MJSchemeAutomation interface (see below) 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 (see below)
Return Value: MJMixerAutomationinterface

MJVersionAutomation * GetVersion()

Description: gets a MJVersionAutomation interface (see below).
Return Value: MJVersionAutomation interface

MJFileAutomation * GetFile(string strFilename)

Description: gets a MJFileAutomation interface (see below) 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 (see below).
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 (see below) 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 (see below) 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 (see below)
Return Value: MJFieldsAutomation interface

MJZonesAutomation * GetZones()

Description: gets a MJZonesAutomation interface (see below)
Return Value: MJZonesAutomation interface

MJFilesAutomation * CreateFiles()

Description: gets a MJFilesAutomation interface (see below) with no files
Return Value: MJFilesAutomation interface

MJTaskAutomation * GetTask(string strTask)

Description: gets a MJTaskAutomation interface (see below).
Parameters:

  • strTask: the name of the task.

Return Value: MJTaskAutomation interface

MJServicesAutomation * GetServices()

Description: gets a MJServicesAutomation interface (see below).
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)