Simplify Your Workflow with EmEditor's Enhanced Macro Deployment Features

Simplify Your Workflow with EmEditor's Enhanced Macro Deployment Features

John Lv8

Simplify Your Workflow with EmEditor’s Enhanced Macro Deployment Features

April 21, 2008 at 8:39 pm #5677

Yutaka Emura

Keymaster

owilsky wrote:
Hi,

This one is both a cry for help as well as a feature request:

I created some kind of IDE out of EmEditor for our company.
Therefor I created a lot of macros.
Unfortunately because of the way EmEditor stores its configuration it is very difficult to deploy and update the macros on all machines:

– First I install EmEditor
– Then I import a .reg file containing the config that everybody should use
– Then the problems begins: Our macros are stored in C:Documents and Settings[username]Application DataMy Macros.
So you see: Every user has another folder where the macros are saved. So I wrote a tool to change the paths in “HKEY_CURRENT_USERSoftwareEmSoftEmEditor v3Macros”.
Then I saw that the keyboard shortcuts are saved in a binary field in HKEY_CURRENT_USERSoftwareEmSoftEmEditor v3Config[Config Name]PIKM and that this binary field contains the absolute path in binary form —> arghhh!!!

Is there an easier way to do this? (User PCs don’t have admin rights for working, so I prefer saving macros in profile folders because they are updated quite often)
And please consider an easier way to store the configuration in upcoming versions.

Thanks for any help,
Oliver

One option is use INI file settings, which use relative path, but if My Macro folder is under user profile (sucn as UsersJohnDocuments…), you will still have to fix each relative path.

Another option is to use a macro, but this too can take some time. Just in case you want to try this option, I wrote the sample macro to start with:

bAllConfigs = confirm("Do you want to set keyboard in ALL configurations? Click Cancel if you want to set keyboard only in the current configuration.");  
  

if(bAllConfigs){  

    cfgs = new Enumerator(editor.Configs);  

    for(; !cfgs.atEnd(); cfgs.moveNext()){  

        cfg = cfgs.item();  

        SetKeys(cfg);  

else {  

    cfg = document.Config;  

    SetKeys(cfg);  

alert("Keyboard set successfully!");  
  

function SetKeys(cfg)  

    lst = cfg.Keyboard.List;  

    // nKey is a virtual key for the shortcut.  

    // nFlags is a combination of eeVirtualKey, eeShift, eeCtrl, and eeAlt.  See the Macro Reference.  

    // nCmd is the command ID for the macro (9216 through 9216 + 1023).  You can use editor.QueryStringByID method to find the exact command ID.  

    lst.Add(nKey, nFlags, nCmd);  

    cfg.Save();  

 For the next major version, I will try to find a way to transfer the settings, possibly by adding something like \\%MYMACRO\_PATH\\% environment, which can be included in the macro path, so the shortcut settings will be easily transferred to another PC.

Also read:

https://techidaily.com
  • Title: Simplify Your Workflow with EmEditor's Enhanced Macro Deployment Features
  • Author: John
  • Created at : 2024-10-07 17:15:34
  • Updated at : 2024-10-14 19:31:35
  • Link: https://win-tricks.techidaily.com/simplify-your-workflow-with-emeditors-enhanced-macro-deployment-features/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Simplify Your Workflow with EmEditor's Enhanced Macro Deployment Features