- February 16, 2022 at 9:11 pm #28051Display ErrorParticipant
I’d like select some text which is a file path e.g.
and run a macro to open that file path in EmEditor (I can then assign that macro to the context menu).
I tried to record a macro; it copies the highlighted text but obviously stops recording at the Open Dialog.
I also tried the following code, but I clearly don’t know what I’m doing!
Thank you for any help!February 22, 2022 at 8:23 am #28061Yutaka EmuraKeymaster
If you would like to open the selected path, you can write a macro like this:
editor.OpenFile( document.selection.Text, 0, eeOpenAllowNewWindow );February 22, 2022 at 8:33 am #28062Display ErrorParticipant
I seee! So there’s no need to copy the text to clipboard, just use the actual selected text! The macro documentation makes more sense to me now :)
Thanks a lot Yutaka, that works perfectly :)
- You must be logged in to reply to this topic.