In the following posts you'll find some scripts for HTML output of your tracks. The original MM HTML output script has been modified to create these new scripts. Please read the following sections first before using these scripts.
Notes about these scripts:
* Updating the export.vbs might result in losing the updates when new version of MM is installed.
* These scripts have not been extensively tested, so create backup of current HTML output script.
* These scripts have not been tested in other browsers than IE6 so in other browsers the results might be undesired.
* These scripts should not, but could possibly update the MM DB, as such it is always a good idea to backup the DB when trying a third-party script.
* You'll need to modify the scripts do to a mistake in the way forums display code. You'll need to replace this
& n b s p ; part by the same thing without the spaces in between. This code is the HTML code for an empty space (Simply writing an empty space won't do).
* Feel free to use and modify these scripts as that's where they are meant for. They are meant to give you an idea of what is possible as well as some design modifications over the current scripts.
Tip:
* Create a new script file (*.vbs) to include these scripts. This will prevent them from being erased by new installations of MM, allow you to keep the current HTML output script and include as many output scripts as you want. You'll need to add this part first to any new file:
Option Explicit ' report undefined variables, ...
' function for quoting strings
Function QStr( astr)
QStr = chr(34) & astr & chr(34)
End Function
Dim list ' list of songs to be exported
Dim res ' results of dialogs calls
Dim fullfile ' fully specified output file name
Dim fso ' FileSystemObject
' SDB variable is connected to MediaMonkey application object
Sub InitExport( ext, filter, iniDirValue)
fullfile = ""
' Get a list of songs to be exported
Set list = SDB.SelectedSongList
If list.count=0 Then
Set list = SDB.AllVisibleSongList
End If
If list.count=0 Then
res = SDB.MessageBox( "Select songs to be exported, please.", mtError, Array(mbOk))
Exit Sub
End If
' Open inifile and get last used directory
Dim iniF
Set iniF = SDB.IniFile
' Create common dialog and ask where to save the file
Dim dlg
Set dlg = SDB.CommonDialog
dlg.DefaultExt=ext
dlg.Filter=filter
dlg.Flags=cdlOFNOverwritePrompt + cdlOFNHideReadOnly
dlg.InitDir = iniF.StringValue( "Scripts", iniDirValue)
dlg.ShowSave
if Not dlg.Ok Then
Exit Sub ' if cancel was pressed, exit
End If
' Get the selected filename
fullfile = dlg.FileName
' Connect to the FileSystemObject
Set fso = CreateObject("Scripting.FileSystemObject")
' Write selected directory to the ini file
iniF.StringValue( "Scripts", iniDirValue) = fullfile
End Sub
Sub FinishExport( ok)
On Error Resume Next
' remove the output file if terminated
if not Ok then
fso.DeleteFile( fullfile)
end if
' Notify user that it was successful
if ok then
res = SDB.MessageBox( "Export was successfully finished.", mtInformation, Array(mbOk))
else
res = SDB.MessageBox( "Export was terminated.", mtInformation, Array(mbOk))
end if
End Sub
You'll need to modify the following part of the scripts:
Sub ExportHTML to a unique name like
Sub ExportHTML1 or any other unique name.
You'll need to modify the
scripts.ini file as well. You'll need to add one of these:
[ExportHTML]
change to reflect name, like [ExportHTML1]
FileName=Export.vbs
change to filename of new *.vbs file
ProcName=ExportHTML
change to reflect name, like [ExportHTML1]
Order=3
change to unique order number
DisplayName=Export to HTML
change to name you want displayed
Description=Exports selected songs to a .htm file
change if you like
Language=VBScript
ScriptType=1
Changes from current version:
* Added code to write space when cell contains no information (solves problem with table borders)
* Changed information displayed (Added Track Number and deleted Media)
* Added CSS for better formatting
* Changed table format (deleted right and left border and added column shading)
* Modified fonts
* Modified color layout
Quick Jump:
http://www.songs-db.com/forum/viewtopic.php?p=2391#2391 - Black & White Theme
http://www.songs-db.com/forum/viewtopic.php?p=2392#2392 - MediaMonkey.com Theme
http://www.songs-db.com/forum/viewtopic.php?p=2393#2393 - Pinternet.net Theme
http://www.songs-db.com/forum/viewtopic.php?p=2394#2394 - Single Artist Display
http://www.songs-db.com/forum/viewtopic.php?p=2395#2395 - Single Artist Sorted By Album Display
Lowlander
In the following posts you'll find some scripts for HTML output of your tracks. The original MM HTML output script has been modified to create these new scripts. Please read the following sections first before using these scripts.
[b]Notes about these scripts:[/b]
* Updating the export.vbs might result in losing the updates when new version of MM is installed.
* These scripts have not been extensively tested, so create backup of current HTML output script.
* These scripts have not been tested in other browsers than IE6 so in other browsers the results might be undesired.
* These scripts should not, but could possibly update the MM DB, as such it is always a good idea to backup the DB when trying a third-party script.
* You'll need to modify the scripts do to a mistake in the way forums display code. You'll need to replace this [color=red][b]& n b s p ;[/b][/color] part by the same thing without the spaces in between. This code is the HTML code for an empty space (Simply writing an empty space won't do).
* Feel free to use and modify these scripts as that's where they are meant for. They are meant to give you an idea of what is possible as well as some design modifications over the current scripts.
[b]Tip:[/b]
* Create a new script file (*.vbs) to include these scripts. This will prevent them from being erased by new installations of MM, allow you to keep the current HTML output script and include as many output scripts as you want. You'll need to add this part first to any new file:
[quote]
Option Explicit ' report undefined variables, ...
' function for quoting strings
Function QStr( astr)
QStr = chr(34) & astr & chr(34)
End Function
Dim list ' list of songs to be exported
Dim res ' results of dialogs calls
Dim fullfile ' fully specified output file name
Dim fso ' FileSystemObject
' SDB variable is connected to MediaMonkey application object
Sub InitExport( ext, filter, iniDirValue)
fullfile = ""
' Get a list of songs to be exported
Set list = SDB.SelectedSongList
If list.count=0 Then
Set list = SDB.AllVisibleSongList
End If
If list.count=0 Then
res = SDB.MessageBox( "Select songs to be exported, please.", mtError, Array(mbOk))
Exit Sub
End If
' Open inifile and get last used directory
Dim iniF
Set iniF = SDB.IniFile
' Create common dialog and ask where to save the file
Dim dlg
Set dlg = SDB.CommonDialog
dlg.DefaultExt=ext
dlg.Filter=filter
dlg.Flags=cdlOFNOverwritePrompt + cdlOFNHideReadOnly
dlg.InitDir = iniF.StringValue( "Scripts", iniDirValue)
dlg.ShowSave
if Not dlg.Ok Then
Exit Sub ' if cancel was pressed, exit
End If
' Get the selected filename
fullfile = dlg.FileName
' Connect to the FileSystemObject
Set fso = CreateObject("Scripting.FileSystemObject")
' Write selected directory to the ini file
iniF.StringValue( "Scripts", iniDirValue) = fullfile
End Sub
Sub FinishExport( ok)
On Error Resume Next
' remove the output file if terminated
if not Ok then
fso.DeleteFile( fullfile)
end if
' Notify user that it was successful
if ok then
res = SDB.MessageBox( "Export was successfully finished.", mtInformation, Array(mbOk))
else
res = SDB.MessageBox( "Export was terminated.", mtInformation, Array(mbOk))
end if
End Sub
[/quote]
You'll need to modify the following part of the scripts:
[b]Sub ExportHTML[/b] to a unique name like [b]Sub ExportHTML1[/b] or any other unique name.
You'll need to modify the [b]scripts.ini[/b] file as well. You'll need to add one of these:
[ExportHTML] [i]change to reflect name, like [ExportHTML1][/i]
FileName=Export.vbs [i]change to filename of new *.vbs file[/i]
ProcName=ExportHTML [i]change to reflect name, like [ExportHTML1][/i]
Order=3 [i]change to unique order number[/i]
DisplayName=Export to HTML [i]change to name you want displayed[/i]
Description=Exports selected songs to a .htm file [i]change if you like[/i]
Language=VBScript
ScriptType=1
[b]Changes from current version:[/b]
* Added code to write space when cell contains no information (solves problem with table borders)
* Changed information displayed (Added Track Number and deleted Media)
* Added CSS for better formatting
* Changed table format (deleted right and left border and added column shading)
* Modified fonts
* Modified color layout
[b]Quick Jump:[/b]
[url]http://www.songs-db.com/forum/viewtopic.php?p=2391#2391[/url] - Black & White Theme
[url]http://www.songs-db.com/forum/viewtopic.php?p=2392#2392[/url] - MediaMonkey.com Theme
[url]http://www.songs-db.com/forum/viewtopic.php?p=2393#2393[/url] - Pinternet.net Theme
[url]http://www.songs-db.com/forum/viewtopic.php?p=2394#2394[/url] - Single Artist Display
[url]http://www.songs-db.com/forum/viewtopic.php?p=2395#2395[/url] - Single Artist Sorted By Album Display
Lowlander