MediaMonkey and Powershell

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: MediaMonkey and Powershell

Re: MediaMonkey and Powershell

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?

MediaMonkey and Powershell

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 ()

Top