- AuthorPosts
- October 17, 2011 at 8:02 am #9737derekcohenParticipant
I’d like a macro to copy the name of a file to the clipbaord by an option added to the context menu if possible.
This could be from the open documents list or from the projects list or from the file editor pane (or all of them).
Ideally I’d like the file name without the path.
thanks
Derek
October 17, 2011 at 8:27 am #9738derekcohenParticipantworked it out:
document.CopyFullName();
var fn=clipboardData.getData(‘Text’);
fnArray=fn.split(”);
clipboardData.setData(“Text”,fnArray[fnArray.length-1]);Is there an API reference anywhere?
thanks
Derek
October 17, 2011 at 10:49 am #9739StefanParticipantHi Derek.
derekcohen wrote:
Is there an API reference anywhere?
I think EmEditor Help (F1) > Macro Reference
is what you search for.So here is my solution:
EmEditor Help > Macro Reference > Document Object > Properties: Name Property
clipboardData.setData(“Text”, document.Name );
_
There are also
document.FullName
document.Path
and many more… - AuthorPosts
- You must be logged in to reply to this topic.