Winamp Mp3Tag Plugin Workaround


#1

There was a feature request in german forum for writing a Winamp Mp3Tag plug-in that would make it possible to edit selection in Playlist or MediaLibrary with Mp3Tag.
Now I've discovered a plug-in called ActiveWinamp that can run VBScripts (and do some other things) which allows to call other programs, like Mp3Tag :slight_smile:

I've made a set of scripts (extract attachment to "where_you've_installed_Winamp\Plugins\Scripts") which allows doing following actions from Winamp:

  • Mp3Tag - Edit selected items (Playlist & ML): makes a temporary playlist with selected files and opens it with Mp3Tag
  • Mp3Tag - Edit whole playlist (Playlist): the same with whole playlist
  • Mp3Tag - Open directory (Playlist & ML): opens directory where the first selected file is with Mp3Tag

Scripts can be called from Popup-Menu in Playlist (Item "Scripts") and/or MediaLibrary (Item "Send To")

NOTE: temporary playlist is created in %temp%\temp_mp3tag_playlist.m3u and is not deleted later because i don't know if Mp3Tag has loaded it completely :frowning:
if someone knows how to wait in Visual Basic Script e.g. 20 second before deleting file (or has a better solution), please post here :wink:

EDIT: Attachement is in my later post
EDIT2: actualized scriptnames
Regards
nickless


Winamp 2/5-Plugin
#2

Nice :slight_smile:

Thanks for your contribution!

Best regards,
~ Florian


#3

nickless,

I didn't know about the ActiveWinamp plugin, that's great information. I like your solution as well.

You can call the sleep function for x seconds, but there's a much better way. If you're not aware, there is an AutoIt dll (AutoItx.dll) that you can call on from VBScript. It has most of the functionality of the AutoIt scripting language. There is a RunWait function that could wait until the MP3tag window is dismissed before deleting the playlist.


#4

Can you use APIs in VBScript files? If so, forget about DLLs and use this:

Declare these three API functions:

Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long

Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long

Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long

Then use the following code:

Dim lngMP3TagProcessID As Long
Dim lngMP3TagProcessHandle As Long

lngMP3TagProcessID = Shell("Path\To\MP3Tag.exe", vbNormalFocus)
lngMP3TagProcessHandle = OpenProcess(&H100000, 0, lngMP3TagProcessID)

If Not lngMP3TagProcessHandle = 0 Then
  WaitForSingleObject lngMP3TagProcessHandle, -1
  CloseHandle lngMP3TagProcessHandle
End If

Kill "Path\To\Playlist.m3u"

#5

I haven't tested this code because I'm at work, but more as an FYI... There are no types in VBScript, everything is an object under the covers.


#6

Ah, OK, thanks. I am used to legacy VB. :slight_smile:


#7

I don't think so, since your code produce errors in every line of code...

I've not tested the AutoIt dll jet and Sleep function doesn't seem to be supported in ActiveWinamp, and at the moment it's difficult for me to get along with VBScript and especially with ActiveWinamp, because I still can't find normal documentation...
Maybe Winamp forums will help...


#8

I'll give it a shot as well. If I have time tonight, I'll see what I can do and report back...


#9

I've found the way to set a timer to 20 seconds and delete the temporary playlist.

EDIT: Attachment is here.


#10

Great stuff nickless. You should add them to the ActiveWinamp Wiki.


#11

I've slightly changed the scripts one more time (just removed unnecessary things) and renamed them to have them together in Popupmenu.

I'm glad that you like it :smiley:

Good idea, I didn't know about this site.

Regards
nickless

Mp3Tag_Scripts.zip (4.3 KB)