EmEditor (text editor) Forum Index Macro Samples
Learning by doing: Add your own Pop-Up menu | Register To Post |
| Threaded | Newest First | Previous Topic | Next Topic | Bottom |
| Poster | Thread |
|---|---|
| Stefan | Posted on: 11/1/2011 1:50 pm |
Home away from home ![]() ![]() Joined: 7/14/2008 From: Germany, EU Posts: 262 |
Learning by doing: Add your own Pop-Up menu Just as an example what can be done.
An how to add an own pop-up menu to execute an function from your script/macro or EmEditors build-in commandos. You can create your own menu in EmEditor, here e.g. an pop-up menu, launched by key-press or from customized menu: To create your own pop-up menu follow this steps: 1. Copy the below code into EmEditor and Save as e.g. myMenu.jsee 2. Execute menu "Macros > Select This" to add this macro to My Macros 3. Assign an keyboard shortcut to launch this pop-up menu > Tools > Properties for all configurations > [Keyboard] > Category: My Macros > Commands: myMenu.jsee > Press new shortcut key: e.g. Ctrl+Alt+M > [Assign] > [OK] How to use: - press "Ctrl+Alt+M" to launch your new menu. The code to create such an menu: See EmEditor help > PopupMenu Object for more infos. Instead, or as addition, to use an shortcut to launch your menu, you can customize the EmEditor main menu (or others, e.g. the context or the tray-icon menu) to add your own menu-items or even an completely whole new menu. You have saved the pop-up menu script as shown above to an file? Now, follow this steps: * Tools > Customize Menus... * choose here e.g. 'Main Menu' * click at the last item: '&Help' * click at [Insert Below] >> (o)Popup, Name: 'MyMenu' >> [OK] * click at the last item: 'MyMenu' * click at [Insert Right] >> (o)Command >> Category: My Macros >> Commands: myMenu.jsee >> [OK] > [OK] (Instead of an own menu, you can also add your script as an item to e.g Tools menu) You should have an new main menu entry 'MyMenu' now after 'Help': How to use: - click at the item in your menu to launch your script. An pop-up menu example: . |
| Threaded | Newest First | Previous Topic | Next Topic | Top |
| Register To Post | |


