Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10902

    Stefan
    Participant

    Hi Yutaka,

    i want to suggest to add two new parameters to Tools and Snippets plugin:

    ${EE_PATH}
    ${EE_Drive}

    ${EE_PATH} will point to the folder where current EmEditor.exe is started from.
    ${EE_Drive} will point to the DRIVE where current EmEditor.exe is started from.

    So if i start EmEditor from “X:ToolsEditEmEditor” we will get
    ${EE_PATH} = “X:ToolsEditEmEditor”
    ${EE_Drive} = “X”

    That would be really useful for portable use on an thump drive.

    For tools I can already use relative paths.
    But for snippets, since we utilize comspec the default start path will be SystemRoot

    Thank you.

    EDIT:

    OK, with snippets relative paths works too.
    I just have to utilize the right option:

    Instead of using command shell cmd.exe with `#cmd foobar`
    i use now ShellExecute by `- foobar`

    `- AHKAutoHotkey.exe ${FilenameEx}`

    while AHK is a sub folder of
    “X:ToolsEditEmEditor”

    Thank you.
    .

    #10907

    Yutaka Emura
    Keymaster

    Hello Stefan,

    ${EE_Drive} is not available, but ${EE_PATH} is $(Dir). Can you try that?

    Thanks!

    #10908

    Stefan
    Participant

     

    Hello Yutaka,

    many thanks for feedback, very appreciated!

    Unfortunately I do not understand.

    As you may know already very well

    $(Dir) or better ${Dir} will return the path of the current open document.

    Whereas ${EE_PATH} would point always to the folder where the EmEditor.exe is in.

    So unfortunately this will not help me much 😉

    So I still wants you to consider to implement this new parameters
    ${EE_PATH} = path to EE folder
    ${EE_DRIVE} = drive letter from which EE is currently started.

    That are standard parameters to work always portable,
    no matter where EmEditor is installed or which drive letter
    the USB thump drive have gotten this day.

    Thank you.

    I hope I have not missed something obviously?

    Yutaka wrote:

    but ${EE_PATH} is $(Dir).

     

    #10909

    Yutaka Emura
    Keymaster

    Hello,

    I see. I understand. I will think about that.

    To work around this, if you use a macro or Snippet macro, you can use

    editor.FullName;

    to get the full path of EmEditor.exe.

    Thanks!

    #10960

    Stefan
    Participant

     

    Posted on: 4/17/2013 1:12 am
    EmEditor Professional v13 beta (12.9.0) released!

    $(AppDir), $(AppDrive), and $(Clipboard) parameters
    were added to the External Tool Properties.

    Thank you Yutaka.

    Tested an it works as indented.

    Any change the ${} equivalent form
    will be added to the Snippets Plugin too?

    – – –

    Examples for $(AppDir)and $(AppDrive) on Tools:

    – having EmEditor on an Thump-Drive:
    U:SB-DriveEmEditor
    – having an compiler or interpreter there too:
    U:SB-DriveWork
    – you want to call that tool from within EmEditor
    but the drive letter of the USB drive changes on every PC
    so you can’t just point to U: always?

    One way is to use this new parameter $(AppDrive)
    which points to the current drive letter EmEditor is started from:
    $(AppDrive):SB-DriveWork

    If you have your tool in an sub folder of the EmEditor folder
    and you don’t want to work with relative paths because that
    always confuse you, you may want to use the new parameter
    $(AppDir) which point to the folder EmEditor is started from:
    ?:SB-DriveEmEditor

    .

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.