PROBLEM HAS EVOLVED: Man, I got lots of trouble when for a while NOTHING seemed to work. Then I came to a point where line 1 below didn't work but line 2 did!
Code: Select all
... <img src='" & strAlbumArtFile & "'> ...
... <img src='" & strAlbumArtFile & "'> ...
See the difference?? How could you; but at some point I copy/pasted some snippet somewhere and the space after the first 'img' is NOT a space but '/xe0' character. It spread like a virus too. What a waste of hours!
------- anyway -------------
Alright, someone be a script hero and help me with this last leg here! I'm begging!
I have a panel (very stripped/core version of the MMonkey SongInfoPanel script). The panel is drawn in HTML.
I have two buttons in the HTML which pass a variable to a sub so - when a button is pressed the Custom4 tag gets the variable written to it.
This works, but isn't handled right, as BOTH BUTTONS WRITE THE VARIABLE 'SubGenre222'.
Code: Select all
Doc.Add " <HTML><HEADER></HEADER><BODY>... etc
Doc.Add " <BUTTON NAME='button1' Onclick=" & writeCustom4(SubGenreOne) & ">First button</button>"
Doc.Add " <BUTTON NAME='button2' Onclick=" & writeCustom4(SubGenreTwo) & ">Second button</button>"
...
Function writeCustom4(xxx)
' Dim SDB
' Set SDB = CreateObject("SongsDB.SDBApplication")
Dim nowsong
Set nowsong = SDB.Player.CurrentSong
nowsong.Custom4 = xxx
' Dim list
' Set list = SDB.NewSongList
' list.Add(nowsong)
' nowsong.UpdateAll
' list.UpdateAll
' Set list = Nothing
' Set SDB = Nothing
' Set nowsong = Nothing
' Set SubGenreOne = Nothing
' Set SubGenreTwo = Nothing
End Function
If problem 1 gets fixed, then will have to figure out the proper way to write the tags. Without the commented out bits of the function above, the tags dont stick. Reopen mMonkey, they're gone. BUT with them uncommented, the tags were being written when a song changed, without any button pressing. Do I need a routine to check for the event?
or something? -- Thank You.
PROBLEM HAS EVOLVED: Man, I got lots of trouble when for a while NOTHING seemed to work. Then I came to a point where line 1 below didn't work but line 2 did!
[code] ... <img src='" & strAlbumArtFile & "'> ...
... <img src='" & strAlbumArtFile & "'> ...[/code]
See the difference?? How could you; but at some point I copy/pasted some snippet somewhere and the space after the first 'img' is NOT a space but '/xe0' character. It spread like a virus too. What a waste of hours!
------- anyway -------------
Alright, someone be a script hero and help me with this last leg here! I'm begging!
I have a panel (very stripped/core version of the MMonkey SongInfoPanel script). The panel is drawn in HTML.
I have two buttons in the HTML which pass a variable to a sub so - when a button is pressed the Custom4 tag gets the variable written to it.
This works, but isn't handled right, as BOTH BUTTONS WRITE THE VARIABLE 'SubGenre222'.
[code]Doc.Add " <HTML><HEADER></HEADER><BODY>... etc
Doc.Add " <BUTTON NAME='button1' Onclick=" & writeCustom4(SubGenreOne) & ">First button</button>"
Doc.Add " <BUTTON NAME='button2' Onclick=" & writeCustom4(SubGenreTwo) & ">Second button</button>"
...
Function writeCustom4(xxx)
' Dim SDB
' Set SDB = CreateObject("SongsDB.SDBApplication")
Dim nowsong
Set nowsong = SDB.Player.CurrentSong
nowsong.Custom4 = xxx
' Dim list
' Set list = SDB.NewSongList
' list.Add(nowsong)
' nowsong.UpdateAll
' list.UpdateAll
' Set list = Nothing
' Set SDB = Nothing
' Set nowsong = Nothing
' Set SubGenreOne = Nothing
' Set SubGenreTwo = Nothing
End Function[/code]
If problem 1 gets fixed, then will have to figure out the proper way to write the tags. Without the commented out bits of the function above, the tags dont stick. Reopen mMonkey, they're gone. BUT with them uncommented, the tags were being written when a song changed, without any button pressing. Do I need a routine to check for the event?
[code]"If IsObject(xxx) = True Then"[/code] or something? -- Thank You.