script for tag-field "occasion"

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

dave.w

script for tag-field "occasion"

Post by dave.w »

Hi together,

I tried for the first time to write a Script, which enters into the field "occasion" a value. And - of course - I failed. :-(

this is my script:

Code: Select all

Sub TagSession
  ' Define variables
  Dim list, itm, i, tmp

  ' Get list of selected tracks from MediaMonkey
  Set list = SDB.CurrentSongList 

  ' Process all selected tracks
  For i=0 To list.count-1
    Set itm = list.Item(i)
    itm.ClassificationOccasion = "Session"
  Next

  ' Write all back to DB and update tags
  list.UpdateAll
End Sub

Filename = TagSession.vbs

Into the .ini I made this entry:

Code: Select all

[TagSession]
FileName=TagSession.vbs
ProcName=TagSession
Order=50
DisplayName=TagSession
Description=TagSession
Language=VBScript
ScriptType=0

starting the script I get the following error message:

Error 438...
the object does not support this ...: itm.ClassificationOccasion
File: ... Line 11, Column 4

after that:

Error happened during script execution:
the object ... (as above)

I'm quite sure that it's only because of the wrong field-name but unfortunately I didn't found any list of the field-names so that I don't know the right one.

Maybe someone can help me? Thanks in advance!

regards
David
Last edited by Lowlander on Thu Mar 20, 2014 12:45 pm, edited 1 time in total.
Reason: Moved to correct Forum
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: script for tag-field "occasion"

Post by nohitter151 »

MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
dave.w

script for tag-field "occasion"

Post by dave.w »

Hi together,

I tried for the first time to write a Script, which enters into the field "occasion" a value. And - of course - I failed. :-(

this is my script:

Code: Select all

Sub TagSession
  ' Define variables
  Dim list, itm, i, tmp

  ' Get list of selected tracks from MediaMonkey
  Set list = SDB.CurrentSongList 

  ' Process all selected tracks
  For i=0 To list.count-1
    Set itm = list.Item(i)
    itm.ClassificationOccasion = "Session"
  Next

  ' Write all back to DB and update tags
  list.UpdateAll
End Sub

Filename = TagSession.vbs

Into the .ini I made this entry:

Code: Select all

[TagSession]
FileName=TagSession.vbs
ProcName=TagSession
Order=50
DisplayName=TagSession
Description=TagSession
Language=VBScript
ScriptType=0

starting the script I get the following error message:

Error 438...
the object does not support this ...: itm.ClassificationOccasion
File: ... Line 11, Column 4

after that:

Error happened during script execution:
the object ... (as above)

I'm quite sure that it's only because of the wrong field-name but unfortunately I didn't found any list of the field-names so that I don't know the right one.

Maybe someone can help me? Thanks in advance!

regards
David
Post Reply