Copy link to clipboard
Copied
Tell me the name of the open file? In photoshop. Where can I find a name like Photoshop Contactsheet?
Copy link to clipboard
Copied
What is the context? What ate you wishing to do?
Your last post was about creating a script from an action... So is this a scripting question?
If so:
app.activeDocument.name;
Or to remove the filename extension, one method is:
app.activeDocument.name.replace(/\.[^\.]+$/, '');
Copy link to clipboard
Copied
No, can the name be obtained without script also?
Copy link to clipboard
Copied
One answer is on the tab if viewing in tab mode, or the title bar for a document in a floating window.
Or the bottom of the Window menu, where the active document will have a tick/check mark next to it.
I get the feeling that I'm not understanding as these are very obvious answers.
Copy link to clipboard
Copied
You are right. But I also want to copy it.
Copy link to clipboard
Copied
But I also want to copy it.
By @MJ ST
Image > Duplicate
or
// Copy Active Document Name with Extension to Clipboard
#target photoshop
var doc = app.activeDocument.name;
var d = new ActionDescriptor();
d.putString(stringIDToTypeID("textData"), doc);
executeAction(stringIDToTypeID("textToClipboard"), d, DialogModes.NO);
Copy link to clipboard
Copied
Is there no other option?
Copy link to clipboard
Copied
Is there no other option?
By @MJ ST
¯\_(ツ)_/¯
alert(app.activeDocument.name);
I still feel as if I’m missing something!
Copy link to clipboard
Copied
Are there no other options besides scripts?
Copy link to clipboard
Copied
What was wrong with manually copying the name from the native window of the Image > Duplicate command?
Copy link to clipboard
Copied
Because he doesn't seem to take action
Copy link to clipboard
Copied
Because he doesn't seem to take action
By @MJ ST
No, actions can't copy the document name (without the help of a script).
Copy link to clipboard
Copied
Hmm