Page 1 of 1

MediaMonkey and Powershell

Posted: Fri Nov 01, 2013 3:51 pm
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 ()

Re: MediaMonkey and Powershell

Posted: Fri Nov 01, 2013 9:36 pm
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?