Answered
only the link file name alert
A selected object
I just want to alert the name
not the file extension
var mySel = app.activeDocument.selection;
alert (mySel.link.name);
Alert : Flower.eps (this not)
Alert : Flower (I want)
A selected object
I just want to alert the name
not the file extension
var mySel = app.activeDocument.selection;
alert (mySel.link.name);
Alert : Flower.eps (this not)
Alert : Flower (I want)
Ok, the problem is about dealing with the selection on top of displaying the link name without extension. Try this:
mySel = app.selection[0];
alert (mySel.graphics[0].itemLink.name.replace(/(.+)(\..+)$/, '$1'));
Peter
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.