Passwords and Lost .ini files.
Passwords and Lost .ini files.
I really did it this time
I have apparently deleted my scripts.ini file, can I get another?
Also I have purchased the Life Time Membership for MM, but I can't find my password for registering. I would like toclear my computer out one day but want to be able to reload MM. How can I get this information?
-Thnx
I have apparently deleted my scripts.ini file, can I get another?
Also I have purchased the Life Time Membership for MM, but I can't find my password for registering. I would like toclear my computer out one day but want to be able to reload MM. How can I get this information?
-Thnx
Email support
Email support they normally are able to help with lost passwords.
Download MediaMonkey | License
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
Help Anyone?
Hey Lowlander
Can u help me? I know your busy... but I think my problem is simple...
I'm trying to have a script that does something like this...
Artist1___Album1
________Album2
________Album3
Artist2___Album1
________Album2
Artist3___Album1
Any Ideas?
Do I need a "Dim itm.art" at beginning of vbs script?
Or change the varible?
THnx-
Can u help me? I know your busy... but I think my problem is simple...
I'm trying to have a script that does something like this...
Artist1___Album1
________Album2
________Album3
Artist2___Album1
________Album2
Artist3___Album1
Any Ideas?
Code: Select all
' Iterate through the list and export all songs
Progress.MaxValue = list.count
Dim i, itm
for i=0 to list.count-1
Set itm = list.Item(i)
if itm.art = itm.ArtistName then
WS.Cells(i+2,1).Value = "& n b s p ;"
else
WS.Cells(i+2,1).Value = itm.ArtistName
end if
if itm.alb = itm.AlbmName then
WS.Cells(i+2,2).Value = "& n b s p ;"
else
WS.Cells(i+2,2).Value = itm.AlbumName
end if
Set itm.art = itm.ArtistName
Set itm.alb = itm.AlbumName
Progress.Value = i+1
if Progress.Terminate then
Exit For
end if
next
Or change the varible?
THnx-
Well I'm not sure yet as I got stuck here too. In my HTML scripts post I have tracks from one artist subdivided by album.
http://www.songs-db.com/forum/viewtopic.php?p=2395#2395 but make sure that you read the first post as code from that post is needed too.
A big problem is that I wasn't able to sort export tracks from within the code to export them.
What are you exporting the output to?
http://www.songs-db.com/forum/viewtopic.php?p=2395#2395 but make sure that you read the first post as code from that post is needed too.
A big problem is that I wasn't able to sort export tracks from within the code to export them.
What are you exporting the output to?
Download MediaMonkey | License
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
This part is the key in the code as it checks the new track to be written to the output file is the same as before.If itm.AlbumName <> currentalbum Then
fout.WriteLine "<TR><TD COLSPAN=6 ID=album><BR><BR>"&itm.AlbumName&"</TD></TR>"
currentalbum=itm.AlbumName
In this case if not the same an output is written.
My question now is if you are just trying to write a list of albums per artist or also the tracks?
Download MediaMonkey | License
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
list
the list should just contain the artist subdivided into albums.
Export is to excel.
Export is to excel.
Code: Select all
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 tracks 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 completed successfully.", mtInformation, Array(mbOk))
else
res = SDB.MessageBox( "Export was terminated.", mtInformation, Array(mbOk))
end if
End Sub
Sub ExportXLS
' initialize export
Call InitExport( ".xls", "Excel sheet (*.xls)|*.xls|All files (*.*)|*.*", _
"LastExportExcelDir")
if fullfile="" then
Exit Sub
end if
if fso.FileExists( fullfile) then
fso.DeleteFile( fullfile)
end if
On Error Resume Next
' Connect to Excel
Dim Excel, WB, WS
Set Excel = CreateObject("Excel.application")
If Err.Number<>0 then
MsgBox "Microsoft Excel could not be found, please install it and try again."
Err.Clear
Exit Sub
End If
On Error GoTo 0
' Create a new workbook and get its worksheet
Set WB = Excel.WorkBooks.Add
Set WS = WB.Sheets(1)
' Use progress to notify user about the current action
Dim Progress
Set Progress = SDB.Progress
Progress.Text = "Exporting to an Excel file..."
' Create a header
WS.Cells(1,1).Value = "Artist"
WS.Cells(1,2).Value = "Album"
WS.Rows("1:1").Font.Bold = True
' Iterate through the list and export all songs
Progress.MaxValue = list.count
Dim i, itm
for i=0 to list.count-1
Set itm = list.Item(i)
if itm.art = itm.ArtistName then
WS.Cells(i+2,1).Value = "&"
else
WS.Cells(i+2,1).Value = itm.ArtistName
end if
if itm.alb = itm.AlbmName then
WS.Cells(i+2,2).Value = "&"
else
WS.Cells(i+2,2).Value = itm.AlbumName
end if
Set itm.art = itm.ArtistName
Set itm.alb = itm.AlbumName
Progress.Value = i+1
if Progress.Terminate then
Exit For
end if
next
' Was it successfull?
Dim ok
if Progress.Terminate then
ok = False
else
ok = True
WB.SaveAs fullfile
end if
WB.Close false
' hide progress
Set Progress = Nothing
FinishExport( ok)
End Sub
Outside the for loop (above) you would need to declare the itm.art and itm.alb as done in my script.
It seems you are otherwise on the right track. I haven't tried your script so I can't see whats going on.
You might want to change the names of itm.art & itm.alb as I believe you are referencing an array this way. Use names like currentArtist & currentAlbum.
A limitation of the script is that the list needs to be sorted on artist and than album.
Maybe the program makers can help us on the script to sort the tracklistings in the script itself before using it.
It seems you are otherwise on the right track. I haven't tried your script so I can't see whats going on.
You might want to change the names of itm.art & itm.alb as I believe you are referencing an array this way. Use names like currentArtist & currentAlbum.
A limitation of the script is that the list needs to be sorted on artist and than album.
Maybe the program makers can help us on the script to sort the tracklistings in the script itself before using it.
Download MediaMonkey | License
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
I get the idea that you are exporting to excel.
the & n b s p ; you can replace most likely by a single space or actually nothing. The & n b s p ; is needed for HTML.WS.Cells(i+2,1).Value = "& n b s p ;"
Download MediaMonkey | License
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
declaring?
Do you mean "Dim" , is that declaring?
so this instead?
I Have this in my scripts.ini file
Code: Select all
' Iterate through the list and export all songs
Progress.MaxValue = list.count
Dim i, itm
for i=0 to list.count-1
Set itm = list.Item(i)
if itm.art = itm.ArtistName then
WS.Cells(i+2,1).Value = ""
else
WS.Cells(i+2,1).Value = itm.ArtistName
end if
if itm.alb = itm.AlbmName then
WS.Cells(i+2,2).Value = ""
else
WS.Cells(i+2,2).Value = itm.AlbumName
end if
Set itm.art = itm.ArtistName
Set itm.alb = itm.AlbumName
Progress.Value = i+1
if Progress.Terminate then
Exit For
end if
next
Code: Select all
[Export for Excel]
Filename=Outputlist.vbs
ProcName=ExportXLS
Order=1
DisplayName=Output The List
Language=VBScript
ScriptType=1
Dim variable is a variable declaration
I also added the declaration for the currentArtist & currentAlbum.
This should get you closer.
PS remember I haven't had a chance to check code, so problems might still exist.
I replaced the itm.art with currentArtist as described before it probably doesn't work with a . in the name. It still would need to be replaced for the remaining code.Iterate through the list and export all songs
Progress.MaxValue = list.count
Dim i, itm
Dim currentArtist, currentAlbum
for i=0 to list.count-1
Set itm = list.Item(i)
if currentArtist = itm.ArtistName then
WS.Cells(i+2,1).Value = ""
else
.......
I also added the declaration for the currentArtist & currentAlbum.
This should get you closer.
PS remember I haven't had a chance to check code, so problems might still exist.
Download MediaMonkey | License
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
ok so I need to change th variable.
I want the script to save the artist name to "prevartist"
then I want it to go to the next song, and check if "prevartist=itm.artistname"
If they are the same then the script will move on to the Album
If the album is the same then it will skip to next song.
Does this make since?
I have this so far and it gives me no errors but it doesn't do what I want.
Code: Select all
' Iterate through the list and export all songs
Progress.MaxValue = list.count
Dim i, itm
Dim prevArtist, prevAlbum
for i=0 to list.count-1
Set itm = list.Item(i)
WS.Cells(i+2,1).Value = itm.ArtistName
WS.Cells(i+2,2).Value = itm.AlbumName
**
Progress.Value = i+1
if Progress.Terminate then
Exit For
end if
next
Am I going at this the wrong way or using the wrong commands?
You can't use set here. It's just prevartist = itm.ArtistName.Set prevartist = itm.ArtistName
As for the rest you actually now miss the check:
and the one for album as well.if currentArtist = itm.ArtistName then
WS.Cells(i+2,1).Value = ""
else
WS.Cells(i+2,1).Value = itm.ArtistName
end if
Please report what output you do get when posting, might help in analyzing the error.
Download MediaMonkey | License
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)