script for tag-field "occasion"

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: script for tag-field "occasion"

script for tag-field "occasion"

by dave.w » Thu Mar 20, 2014 1:21 pm

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

Re: script for tag-field "occasion"

by nohitter151 » Thu Mar 20, 2014 12:04 pm

script for tag-field "occasion"

by dave.w » Thu Mar 20, 2014 11:57 am

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

Top