Scriptable Macros

With EmEditor’s macro support, use popular scripting languages to write a macro to do almost anything you want within EmEditor. You can also record keystrokes that you use and reference repeatedly, write your own macros to manipulate other applications, Windows-based files, or network functionality.

  • Write macros with popular script languages
  • Define macros to record keystrokes and mouse operations
  • Assign macros to keyboards and toolbar buttons

EmEditor macros are modules designed independently of EmEditor executable and implemented as a Dynamic Link Library (DLL) file. To conserve system resources, the DLL is only loaded during macro execution. Macros are based on the Windows Scripting Host (WSH) engine; therefore all of the objects under the Windows Scripting Host are available to you. You can program macros with any ActiveScript language, as long as the script engines you want to use are installed on your system, such as JavaScript, VBScript, PerlScript, Python, PHPScript, and Ruby, among other ActiveScript languages.

You can write a macro to do almost anything you want within EmEditor. You can define a macro to record keystrokes that you use and reference repeatedly. EmEditor can record and play keystrokes and mouse operations against other applications. You can even write your own macros to manipulate other applications, Windows-based files, or network functionality. This capability allows you to automate certain tasks on the Desktop, the browser, and your favorite applications. For developers, this ability can be used for testing applications. The Window Object includes properties that tell almost everything about the window, and the Windows Collection enumerates top-level windows or child windows for a certain window. The Shell Object sends keystroke and mouse activities and enumerates or finds top-level windows.

By default, EmEditor automatically adds a macro that has been recorded and saved, to My Macros. All defined My Macros are displayed in a macro toolbar. To view and customize My Macros, select the Customize Macros command on the Macros drop down menu. You can choose to create a new macro, delete a macro, change the order of My Macros, and edit a selected macro. You can also specify if particular macros Run at Events, as well as define those Events and how long their delay times are. If you don’t want your macros to be automatically added to My Macros, select the Customize Macros command from the Macros menu. The macro feature includes a drop down menu and customizable toolbar buttons.

ECMAScript support

With the V8 engine, you can use the latest features under the ECMAScript standards, given that your Edge browser supports them. This means that your macro can use the const and let keywords, the Set collection, and more. You can also import compatible libraries.