Makes a temporary playlist with selected items and opens it with
Mp3Tag
'--------------------------------------------------------------'
' ActiveWinamp Script by nickless '
' Open selected files with Mp3Tag '
'--------------------------------------------------------------'
on error resume next
Const ForWriting = 2
Dim fso, TmpPlaylist, x, TmpPlaylistPath, Mp3TagPath
'get path where Mp3Tag is installed
Mp3TagPath = RegistryRead("HKCU\Software\Florian Heidenreich\Mp3tag\Install", "InstDir")
if Mp3TagPath = "" then
Call MsgBox("This script requires Mp3Tag (www.mp3tag.de) to be installed on your system", 16, "Error: Mp3Tag installation not found")
quit
end if
Mp3TagPath = Mp3TagPath & "\Mp3tag.exe"
Set fso = CreateObject("Scripting.FileSystemObject")
'get filename of temporary playlist
TmpPlaylistPath = GetEnvString("%TEMP%") & "\temp_mp3tag_playlist.m3u"
'create tmp. playlist
Set TmpPlaylist = fso.OpenTextFile(TmpPlaylistPath, ForWriting, True)
x = playlist.getselection()
'write selection to tmp. playlist
TmpPlaylist.WriteLine("#EXTM3U")
for each track in x
TmpPlaylist.WriteLine(track.filename)
next
TmpPlaylist.Close
'run Mp3tag
Call RunProgram("""" & Mp3TagPath & """ ""/m3u:" & TmpPlaylistPath & """", False)
'delete tmp. playlist in 20 seconds and quit, better solutions are welcomed ;-)
settimeout 20000, getref("DelPlaylist")
'--------------------------------------------------------------'
Sub DelPlaylist
Call FileDelete(TmpPlaylistPath)
Quit
End Sub
Sub RunProgram(Filename, Wait)
Set WshShell = CreateObject("Wscript.Shell")
RetVal = WshShell.Run(Filename, Wait)
End Sub
Sub FileDelete(Filename)
Set FileObject = CreateObject("Scripting.FileSystemObject")
FileObject.DeleteFile(Filename)
End Sub
Function RegistryRead(KeyName, ValueName)
Set WshShell = CreateObject("Wscript.Shell")
RegistryRead = WshShell.RegRead(KeyName & "\" & ValueName)
End Function
Function GetEnvString(EnvVariable)
Set WshShell = CreateObject("Wscript.Shell")
GetEnvString = WshShell.ExpandEnvironmentStrings(EnvVariable)
End Function
'--------------------------------------------------------------'
'--------------------------------------------------------------'
' ActiveWinamp Script by nickless '
' Open selected files with Mp3Tag '
'--------------------------------------------------------------'
on error resume next
Const ForWriting = 2
Dim fso, TmpPlaylist, x, TmpPlaylistPath, Mp3TagPath
'get path where Mp3Tag is installed
Mp3TagPath = RegistryRead("HKCU\Software\Florian Heidenreich\Mp3tag\Install", "InstDir")
if Mp3TagPath = "" then
Call MsgBox("This script requires Mp3Tag (www.mp3tag.de) to be installed on your system", 16, "Error: Mp3Tag installation not found")
quit
end if
Mp3TagPath = Mp3TagPath & "\Mp3tag.exe"
Set fso = CreateObject("Scripting.FileSystemObject")
'get filename of temporary playlist
TmpPlaylistPath = GetEnvString("%TEMP%") & "\temp_mp3tag_playlist.m3u"
'create tmp. playlist
Set TmpPlaylist = fso.OpenTextFile(TmpPlaylistPath, ForWriting, True)
x = GetSendToItems
'write selection to tmp. playlist
TmpPlaylist.WriteLine("#EXTM3U")
for each track in x
TmpPlaylist.WriteLine(track.filename)
next
TmpPlaylist.Close
'run Mp3tag
Call RunProgram("""" & Mp3TagPath & """ ""/m3u:" & TmpPlaylistPath & """", False)
'delete tmp. playlist in 20 seconds and quit, better solutions are welcomed ;-)
settimeout 20000, getref("DelPlaylist")
'--------------------------------------------------------------'
Sub DelPlaylist
Call FileDelete(TmpPlaylistPath)
Quit
End Sub
Sub RunProgram(Filename, Wait)
Set WshShell = CreateObject("Wscript.Shell")
RetVal = WshShell.Run(Filename, Wait)
End Sub
Sub FileDelete(Filename)
Set FileObject = CreateObject("Scripting.FileSystemObject")
FileObject.DeleteFile(Filename)
End Sub
Function RegistryRead(KeyName, ValueName)
Set WshShell = CreateObject("Wscript.Shell")
RegistryRead = WshShell.RegRead(KeyName & "\" & ValueName)
End Function
Function GetEnvString(EnvVariable)
Set WshShell = CreateObject("Wscript.Shell")
GetEnvString = WshShell.ExpandEnvironmentStrings(EnvVariable)
End Function
'--------------------------------------------------------------'
Makes a temporary playlist with all items in playlist and opens it with
Mp3Tag
'--------------------------------------------------------------'
' ActiveWinamp Script by nickless '
' Open current playlist with Mp3Tag '
'--------------------------------------------------------------'
on error resume next
Const ForWriting = 2
Dim fso, TmpPlaylist, TmpPlaylistPath, Mp3TagPath
'get path where Mp3Tag is installed
Mp3TagPath = RegistryRead("HKCU\Software\Florian Heidenreich\Mp3tag\Install", "InstDir")
if Mp3TagPath = "" then
Call MsgBox("This script requires Mp3Tag (www.mp3tag.de) to be installed on your system", 16, "Error: Mp3Tag installation not found")
quit
end if
Mp3TagPath = Mp3TagPath & "\Mp3tag.exe"
Set fso = CreateObject("Scripting.FileSystemObject")
'get filename of temporary playlist
TmpPlaylistPath = GetEnvString("%TEMP%") & "\temp_mp3tag_playlist.m3u"
'create tmp. playlist
Set TmpPlaylist = fso.OpenTextFile(TmpPlaylistPath, ForWriting, True)
'write selection to tmp. playlist
TmpPlaylist.WriteLine("#EXTM3U")
for each track in playlist
TmpPlaylist.WriteLine(track.filename)
next
TmpPlaylist.Close
'run Mp3tag
Call RunProgram("""" & Mp3TagPath & """ ""/m3u:" & TmpPlaylistPath & """", False)
'delete tmp. playlist in 20 seconds and quit, better solutions are welcomed ;-)
settimeout 20000, getref("DelPlaylist")
'--------------------------------------------------------------'
Sub DelPlaylist
Call FileDelete(TmpPlaylistPath)
Quit
End Sub
Sub RunProgram(Filename, Wait)
Set WshShell = CreateObject("Wscript.Shell")
RetVal = WshShell.Run(Filename, Wait)
End Sub
Sub FileDelete(Filename)
Set FileObject = CreateObject("Scripting.FileSystemObject")
FileObject.DeleteFile(Filename)
End Sub
Function RegistryRead(KeyName, ValueName)
Set WshShell = CreateObject("Wscript.Shell")
RegistryRead = WshShell.RegRead(KeyName & "\" & ValueName)
End Function
Function GetEnvString(EnvVariable)
Set WshShell = CreateObject("Wscript.Shell")
GetEnvString = WshShell.ExpandEnvironmentStrings(EnvVariable)
End Function
'--------------------------------------------------------------'
Opens directory where the first selected file is with
Mp3Tag
'--------------------------------------------------------------'
' ActiveWinamp Script by nickless '
' Open directory where first selected file is with Mp3Tag '
'--------------------------------------------------------------'
on error resume next
Dim x, Mp3TagPath
'get path where Mp3Tag is installed
Mp3TagPath = RegistryRead("HKCU\Software\Florian Heidenreich\Mp3tag\Install", "InstDir")
if Mp3TagPath = "" then
Call MsgBox("This script requires Mp3Tag (www.mp3tag.de) to be installed on your system", 16, "Error: Mp3Tag installation not found")
quit
end if
Mp3TagPath = Mp3TagPath & "\Mp3tag.exe"
x = playlist.getselection()
'run Mp3tag
if ubound(x,1) > 0 then
Call RunProgram("""" & Mp3TagPath & """ /fp:""" & GetFilePath(x(1).filename) & """", False)
end if
Quit
'--------------------------------------------------------------'
Sub RunProgram(Filename, Wait)
Set WshShell = CreateObject("Wscript.Shell")
RetVal = WshShell.Run(Filename, Wait)
End Sub
Function GetFilePath(Filename)
Set FileObject = CreateObject("Scripting.FileSystemObject")
GetFilePath = FileObject.GetParentFolderName(Filename)
End Function
Function RegistryRead(KeyName, ValueName)
Set WshShell = CreateObject("Wscript.Shell")
RegistryRead = WshShell.RegRead(KeyName & "\" & ValueName)
End Function
'--------------------------------------------------------------'
'--------------------------------------------------------------'
' ActiveWinamp Script by nickless '
' Open directory where first selected file is with Mp3Tag '
'--------------------------------------------------------------'
on error resume next
Dim x, Mp3TagPath
'get path where Mp3Tag is installed
Mp3TagPath = RegistryRead("HKCU\Software\Florian Heidenreich\Mp3tag\Install", "InstDir")
if Mp3TagPath = "" then
Call MsgBox("This script requires Mp3Tag (www.mp3tag.de) to be installed on your system", 16, "Error: Mp3Tag installation not found")
quit
end if
Mp3TagPath = Mp3TagPath & "\Mp3tag.exe"
x = GetSendToItems
'run Mp3tag
if ubound(x,1) > 0 then
Call RunProgram("""" & Mp3TagPath & """ /fp:""" & GetFilePath(x(1).filename) & """", False)
end if
Quit
'--------------------------------------------------------------'
Sub RunProgram(Filename, Wait)
Set WshShell = CreateObject("Wscript.Shell")
RetVal = WshShell.Run(Filename, Wait)
End Sub
Function GetFilePath(Filename)
Set FileObject = CreateObject("Scripting.FileSystemObject")
GetFilePath = FileObject.GetParentFolderName(Filename)
End Function
Function RegistryRead(KeyName, ValueName)
Set WshShell = CreateObject("Wscript.Shell")
RegistryRead = WshShell.RegRead(KeyName & "\" & ValueName)
End Function
'--------------------------------------------------------------'