# Winamp Mp3Tag Plugin Workaround

**URL:** https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264
**Category:** General Discussion
**Created:** [September 5, 2005, 11:49pm UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264 "2005-09-05T23:49:37Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![nickless](https://community.mp3tag.de/user_avatar/community.mp3tag.de/nickless/32/36_2.png) [@nickless](https://community.mp3tag.de/u/nickless)
#### Post date: [September 5, 2005, 11:49pm UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/1 "2005-09-05T23:49:37Z")

</div>

There was a [feature request](https://community.mp3tag.de/t/1695/1) 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](http://sourceforge.net/projects/activewinamp) that can run VBScripts (and do some other things) which allows to call other programs, like Mp3Tag 🙂

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 ☹  
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 😉

**EDIT: Attachement is in my [later](https://community.mp3tag.de/t/2264/11) post**  
EDIT2: actualized scriptnames  
Regards  
nickless

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [September 6, 2005, 10:46am UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/2 "2005-09-06T10:46:45Z")

</div>

Nice 🙂

Thanks for your contribution!

Best regards,  
~ Florian

---

<div class="post-metadata">

### Author: ![beaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ecb155/32.png) [@beaker](https://community.mp3tag.de/u/beaker)
#### Post date: [September 6, 2005, 12:39pm UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/3 "2005-09-06T12:39:08Z")

</div>

nickless,

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

> [@](#):
>
> 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 ☹  
> 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 😉
> 
> \<{POST\_SNAPBACK}\>

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](http://www.autoitscript.com/autoit3/downloads.php) 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.

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [September 6, 2005, 1:54pm UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/4 "2005-09-06T13:54:25Z")

</div>

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"
```

---

<div class="post-metadata">

### Author: ![beaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ecb155/32.png) [@beaker](https://community.mp3tag.de/u/beaker)
#### Post date: [September 6, 2005, 2:34pm UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/5 "2005-09-06T14:34:15Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [September 6, 2005, 3:26pm UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/6 "2005-09-06T15:26:31Z")

</div>

> [@](#):
>
> 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.
> 
> \<{POST\_SNAPBACK}\>

Ah, OK, thanks. I am used to legacy VB. 🙂

---

<div class="post-metadata">

### Author: ![nickless](https://community.mp3tag.de/user_avatar/community.mp3tag.de/nickless/32/36_2.png) [@nickless](https://community.mp3tag.de/u/nickless)
#### Post date: [September 6, 2005, 3:37pm UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/7 "2005-09-06T15:37:21Z")

</div>

> [@](#):
>
> Can you use APIs in VBScript files? If so, forget about DLLs and use this

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...

---

<div class="post-metadata">

### Author: ![beaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ecb155/32.png) [@beaker](https://community.mp3tag.de/u/beaker)
#### Post date: [September 6, 2005, 4:02pm UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/8 "2005-09-06T16:02:56Z")

</div>

> [@](#):
>
> 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...
> 
> \<{POST\_SNAPBACK}\>

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

---

<div class="post-metadata">

### Author: ![nickless](https://community.mp3tag.de/user_avatar/community.mp3tag.de/nickless/32/36_2.png) [@nickless](https://community.mp3tag.de/u/nickless)
#### Post date: [September 6, 2005, 5:40pm UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/9 "2005-09-06T17:40:46Z")

</div>

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

EDIT: Attachment is [here](https://community.mp3tag.de/t/2264/11).

---

<div class="post-metadata">

### Author: ![Cyrom](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cyrom/32/58_2.png) [@Cyrom](https://community.mp3tag.de/u/Cyrom)
#### Post date: [September 7, 2005, 3:41am UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/10 "2005-09-07T03:41:52Z")

</div>

Great stuff nickless. You should add them to the [ActiveWinamp Wiki](http://www.myplugins.info/activewinamp/doku.php).

---

<div class="post-metadata">

### Author: ![nickless](https://community.mp3tag.de/user_avatar/community.mp3tag.de/nickless/32/36_2.png) [@nickless](https://community.mp3tag.de/u/nickless)
#### Post date: [September 7, 2005, 2:15pm UTC](https://community.mp3tag.de/t/winamp-mp3tag-plugin-workaround/2264/11 "2005-09-07T14:15:41Z")

</div>

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

> [@](#):
>
> Nice smile.gif

> [@](#):
>
> I like your solution as well.

> [@](#):
>
> Great stuff nickless.

I'm glad that you like it 😃

> [@](#):
>
> You should add them to the [ActiveWinamp Wiki](http://www.myplugins.info/activewinamp/doku.php).

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

Regards  
nickless

[Mp3Tag\_Scripts.zip](https://community.mp3tag.de/uploads/default/original/2X/d/d690711e6cfadccbedabc5f84b06873149bcdc0e.zip) (4.3 KB)
