Sorry but the full script is tbone's SelectEx Script Addon. It provides the command SelectEx with several arguments. For the JSFILTER argument you can provide a js-snippet. The code I provided defines this argument and afterwards runs the SelectEx command with several additional arguments. The code can be reduced to this:
[code] var cmd = DOpus.Create.Command
var jsFilter = ""+
"if (item.metadata == 'audio'){ "+
"var year = new String(item.metadata.audio['mp3year']);"+
"if (year.indexOf('198')!=-1) return false; /do not filter/"+
"}";
cmd.RunCommand('SelectEx LINEAR '+
'PATH="'+DOpus.FSUtil.Resolve('/mymusic')+'" RECURSE JSFILTER="'+jsFilter+'" '+
'ITEMCOUNT=1000 '+
'COPYTOCOLL=PopCollection '+
'TOFILE="C:\\Temp\\PopCollection.m3u" '+
'COMMANDS=Go coll://PopCollection')
[/code]