Icon Help
Posted: 23 Mar 2017 10:57
Hi,
New to this forum, so hello to everyone.
I need help with a script to show a different icon depending on whether the file type is a flac, an mp3, or a jpg file.
So far I have come up with the following, but it returns the flac icon for every file.
Ideally I would like it to work based on the file extension, rather than the file type.
I'm new to scripting, so I'm sorry if this is something obvious.
New to this forum, so hello to everyone.
I need help with a script to show a different icon depending on whether the file type is a flac, an mp3, or a jpg file.
So far I have come up with the following, but it returns the flac icon for every file.
Code: Select all
$base = getpathcomponent(<cc_name>, "base");
if (type($base) = flac) {
return "flac.ico";
} elseif (type {$base} = mp3) {
return "mp3.ico";
} else {
return "jpg.ico";
}I'm new to scripting, so I'm sorry if this is something obvious.