View Single Post
Old 21st June 2015, 13:12   #690
Junior Member
Join Date: Jun 2015
Posts: 6
I might be the only one who still uses this, but....

As mentioned in the announcement thread, I forked the project today to get it working for what I needed:

Source->Release to get the latest dll.

Accepts .js and .ps1 (PowerShell) files
Upgraded to full Unicode support
Unicode support also fixed the rating, playcount, lastplay, etc bugs.

To use PowerShell at all, you have to open an admin command prompt and run:
%windir%\syswow64\windowspowershell\v1.0\powershell Set-ExecutionPolicy RemoteSigned

Otherwise PS scripts can't run outside of the PS sandbox. Scripts are named and located the same as before, only with a .ps1 ext.

I'm going to upload some sample scripts, but to use it in a PS script, start with:
$aw = New-Object -ComObject ActiveWinamp.Application

at the top; from there, you can access $aw.playlist, $aw.medialibrary, etc, as you would in VBS. The plugin automatically executes the x86 PS, since Winamp will never be x64. You can call them from the command line, like:
powershell -file "AnyScript.ps1"

If you do, I really recommend adding an x64 guard at the top, like so:
if ($env:Processor_Architecture -ne "x86") {
write-warning 'Switching to x86 mode...'
&"$env:windir\syswow64\windowspowershell\v1.0\powershell.exe" -noninteractive -noprofile -file $myinvocation.Mycommand.path -executionpolicy bypass

I'm going to be adding all of the library fields that aren't available yet next.
SilverbackNet is offline   Reply With Quote