Powerful and functionally-rich macros

EmEditor Professional 4.0 creates functionally-rich macros using JavaScript or VBScript, allowing you to define most operations. Not only can you define a macro which records keystrokes that you use and reference repeatedly, but you can also write your own macros that can manipulate other applications, Windows-based files, or network functionalities. The macros are based on the Windows Scripting Host (WSH) engine, so you can use all of the powerful, robust objects available under the Windows Scripting Host.

EmEditor Professional 4.0 features two newly added configurations: JavaScript for EmEditor and VBScript for EmEditor. When you open a macro file in EmEditor, keywords, such as macro objects, properties, or methods, are automatically highlighted. For assistance on certain keywords, move the cursor over the keyword and select Search for Keyword, or press F1. When an error occurs during the execution of a macro, a dialog box will appear showing the content of the error. If you click on the Edit button, you can jump to the location where the error occurred.

EmEditor uses JavaScript or VBScript for its macro language, so those who are familiar with HTML or Windows scripting will be able to write macros with little difficulty. For those unfamiliar with scripting languages, EmEditor can record keystrokes that can then be saved in a macro file, which can easily be loaded in different situations. With the use of JavaScript or VBScript, you can also troubleshoot your code easily. For example, in JavaScript, you can use the following statement to troubleshoot errors:

try { … } catch(e) { … }

When an error occurs, such as a file opening failure, the try-catch statement allows the script to continue executing, instead of forcing it to terminate.

EmEditor macros are based on the WSH engine, so you can use various Windows-based objects and Component Object Model (COM) components. For example, you can perform regular expression searches using the RegExp object, manipulate files using the FileSystemObject object, create a short-cut, manipulate the Windows Registry using the WshShell object, or work with networking functions using the WshNetwork object. Additionally, you can create and execute a macro that utilizes an external application that supports automation using COM components (such as Word and Excel) to copy a document created in EmEditor, then paste into, and print from the external application.

EmEditor macros are modules designed independently of EmEditor executable and are implemented as a Dynamic Link Library (DLL) file. To conserve system resources, the DLL is loaded only during the macro execution.

EmEditor macros are built on the EmEditor Document Object Model (DOM), which can use 4 objects as well as 104 properties and methods in all. This structure allows you to execute most operations in EmEditor with macros. For more details about EmEditor macros, please refer to the EmEditor Macro Reference.

Finding in files

The Find in Files dialog allows you to specify more details such as an encoding of the file to be searched. You can specify an encoding in the Encoding drop-down list. You can also set up the Specified Encoding, so that a file will be opened with its associated encoding.

Replacing in Files

The Replace in Files feature is a new feature of EmEditor Professional 4.0. Just like the Find in Files, you can use regular expressions to search for specific words and characters. You can also specify an encoding to use for the document. To prevent unwanted automated editing, such as inserting unintended words, EmEditor replaces the words you specify, but leaves the editor open without saving changes right away. Replaced words are highlighted to assist in confirming your changes. if you do not wish to keep the changes, you can easily remove them with the Undo command.

Combine Windows

EmEditor Professional 4.0 can combine multiple windows and show views of all opened EmEditor windows within a single window. This view allows you to navigate through EmEditor windows as if it were a tabbed Multi Document Interface (MDI) application. A single icon is shown in the Taskbar, creating the appearance of working with multiple documents in a single window. By default, the state of the Combine Windows feature corresponds to the Show / Hide state of the windows Toolbar.

Redesigned Menu Structure

With the concept of functionality-at-your-fingertips in mind, EmEditor’s menu structure has been redesigned to be more convenient. For example, the Convert Selection sub-menu has been moved to the Edit menu for easier reference of common commands.

Other New Features

New Features

  • Several highly-requested features have been added to EmEditor Professional 4.0, greatly expanding the Customize dialog.

Further Optimization

EmEditor Professional is optimized for the Pentium 4 CPU, running Windows 2000/XP (You can still use EmEditor Professional with machines running other processors). We have also improved the speed of regular expression searches, EmEditor windows searches, and EmEditor’s start-up time.