Understanding Input Events Like onKeyPress and onClick Within EmEditor
Understanding Input Events Like onKeyPress and onClick Within EmEditor
November 23, 2008 at 5:12 pm #6656
Participant
I don’t know if there is a way to trigger a macro with a mouse click, but you can trigger a macro using a keyboard shortcut. You can also use a single keyboard shortcut to trigger multiple choices for the user, so you do not have to restrict your macro to doing just one “action”.
The following example uses the document.selection and the CreatePopupMenu function inside a jsee macro. The popup menu gives the user multiple choices before displaying the result.
var vtext = document.selection.Text;
var result = '';
var menu = CreatePopupMenu();
menu.Add("look north", 1);
menu.Add("look south", 2);
menu.Add("look east", 3);
result = menu.Track(0);
if(result != 0) {
result = (menu.GetText(result));
Window.alert([result,vtext].join(' '));
Also read:
- [New] 2023 | How to Autoplay Facebook Videos for 2024
- [Updated] Unveiling Windows Media Seamless CD Extraction
- 2024 Approved Top 20 Unlimited Cloud Storage Solutions, Up To 1TB
- Bypassing the Obstacle: Dealing with Device Error 22 on Windows 11
- Check If Your Graphics Card Works With Windows: A Comprehensive Guide by YL Computing
- Connect Your PC to the Web: A Simple Guide From YL Computing - Essential Steps Explained
- Get Started with Mining Pools: A Comprehensive Guide by YL Computing
- Premium Metas: Gain Verified Identity Badge
- Solving the Issue: Why Won't Your PC Detect the Graphics Card? Expert Advice by YL Computing
- Unlocking Faster Performance: A Step-by-Step Guide to Activating Hardware Acceleration in Windows - Tips From YL Computing
- Your Companion List: Greatest Mobile MMOs
- Title: Understanding Input Events Like onKeyPress and onClick Within EmEditor
- Author: Jason
- Created at : 2024-12-07 16:08:47
- Updated at : 2024-12-14 16:00:57
- Link: https://win-great.techidaily.com/understanding-input-events-like-onkeypress-and-onclick-within-emeditor/
- License: This work is licensed under CC BY-NC-SA 4.0.