MediaMonkey and Powershell

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

TankCR
Posts: 51
Joined: Thu Sep 24, 2009 12:55 pm

MediaMonkey and Powershell

Post by TankCR »

So, I thought to myself "if the com object is available why not use powershell?" and sure enough I can load it and call it, I just can get it to do anything usefull, lol. Perhaps someone may have an idea? I created a small script with the idea of opening a small form

Code: Select all

$SDB = New-Object -ComObject SongsDB.SDBApplication 
$INI = $SDB.IniFile
$UI  = $SDB.UI
$DB  = $SDB.DataBase

$akLeft = 1
$akTop = 2
$akRight = 4
$akBottom = 8
$alTop = 1
$alBottom = 2
$alClient = 5
$mmListDropdown = 2
$mmFormScreenCenter = 4
$Form = $SDB.UI.NewForm
$Form.Common.SetRect(100, 100, 500, 400)
$Form.Caption = "Statistics"
$Btn = $SDB.UI.NewButton($Form)
$Btn.Caption = "Close"
$Btn.Common.SetRect(10, 10, 100, 20)
$Form.ShowModal
Unfortunately I just get an output of
OverloadDefinitions
-------------------
int ShowModal ()
TankCR
Peke
Posts: 17494
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: MediaMonkey and Powershell

Post by Peke »

Good start but you had some typos:

Code: Select all

$SDB = New-Object -ComObject "SongsDB.SDBApplication"
#### Your Rest Of Code ####
$Form.ShowModal()
Can you please tell me what you are using for PowerShell Editor?
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Post Reply