MediaMonkey and Powershell

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

Moderator: Gurus

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

MediaMonkey and Powershell

Post by TankCR » Fri Nov 01, 2013 3:51 pm

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: 12126
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: MediaMonkey and Powershell

Post by Peke » Fri Nov 01, 2013 9:36 pm

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,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

Post Reply