quote:
Originally posted by Danny22
code:
UpdatePsm(fileName.Path);
code:
function UpdatePsm(NewFileName)
{
var tempFileName = NewFileName;
// extract the file name
tempFileName = tempFileName.substr(tempFileName.lastIndexOf("\\") + 1);
var extPos = tempFileName.lastIndexOf(".");
if (extPos >= 0) // the file name has an extension
{
// remove the extension
tempFileName = tempFileName.substr(0, extPos);
}
// update personal message
Messenger.MyPersonalMessage = tempFileName;
}
...which essentially does the same as
js code:
Messenger.MyPersonalMessage = fileName.Name.substring(0, fileName.Name.lastIndexOf("."))
back on windows, so it's tested this time