command line – EmEditor (Text Editor) https://www.emeditor.com Best Text Editor, Code Editor, CSV Editor, Large File Viewer for Windows (Free versions available) Mon, 20 Sep 2021 00:03:30 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 CopyQ “edit with editor” https://www.emeditor.com/forums/topic/copyq-edit-with-editor/ Mon, 20 Sep 2021 00:03:30 +0000 https://www.emeditor.com/?post_type=topic&p=27120 Hi, I want to edit some clipboard entries from CopyQ in EmEditor.
With Windows Notepad it works with the “notepad %1” command in CopyQ.
If I put in “emeditor %1” it always says there is no file.
Here is a description from CopyQ for some other Editors:
https://copyq.readthedocs.io/en/latest/faq.html#why-does-my-external-editor-fail-to-edit-items
How I get the Clipboard handover to EmEditor?
Sorry I’m not a programmer I’m just a hardcore salesperson and want to be as productive as possible.
Thanks

]]>
Command-line to create + save new file in EmEditor, without showing any dialogs? https://www.emeditor.com/forums/topic/command-line-to-create-save-new-file-in-emeditor-without-showing-any-dialogs/ Thu, 19 Oct 2017 01:35:15 +0000 https://www.emeditor.com/forums/topic/command-line-to-create-save-new-file-in-emeditor-without-showing-any-dialogs/ Is it possible to create a command-line for EmEditor that will open a new document in EmEditor and save it to a given path, without any dialogs popping up to the user (e.g. the “The specified file does not exist. Open as a new file?” dialog)?

]]>
Enhancement: Possibility to provide macro parameters from the command line https://www.emeditor.com/forums/topic/enhancement-possibility-to-provide-macro-parameters-from-the-command-line/ Wed, 06 Sep 2017 07:13:14 +0000 https://www.emeditor.com/forums/topic/enhancement-possibility-to-provide-macro-parameters-from-the-command-line/ As described in this forum thread, it would be super useful to be able to provide parameter data to macros directly from the command-line, in order to be able to use self-contained command-lines for advanced EmEditor tasks on a daily basis (like for example in my case, integrated with other software tools that can invoke external tools by using such command-lines).

It could look for example like this on the command line:

emeditor.exe c:\some_dir\some_target_file.txt /mf c:\my_emeditor_macros\delete_every_nth_line.jsee -macroparam “n=3”

Or like this for multiple parameters:

emeditor.exe c:\some_dir\some_target_file.txt /mf c:\my_emeditor_macros\delete_every_nth_line.jsee -macroparam “n=3” -macroparam “start_at_line=2”

Or, to remove the complexity of named parameters, simply using unnamed ordered parameters instead, like this:

emeditor.exe c:\some_dir\some_target_file.txt /mf c:\my_emeditor_macros\delete_every_nth_line.jsee -macroparam 3 -macroparam 2

From inside the macro, the parameter data could for example be accessed from a Javascript object that you provide, e.g. called “MacroParameters”, which could either in the simple case with unnamed ordered parameters only be a simple array of strings, or in the little more complex case with named parameters, e.g. be an “associative array” (using Javascript objects and properties), or alternatively perhaps two simple arrays of strings, where one contains the parameter names and one contains the values.

I really hope that you will consider this enhancement suggestion, since I think it would be a highly useful feature to go with the already super useful possibility to execute macros from the command-line with the “/mf” switch. Thanks for listening!

]]>
How to provide parameters for macros executed from the command line? https://www.emeditor.com/forums/topic/how-to-provide-parameters-for-macros-executed-from-the-command-line/ Mon, 04 Sep 2017 21:53:38 +0000 https://www.emeditor.com/forums/topic/how-to-provide-parameters-for-macros-executed-from-the-command-line/ Using the /mf switch, it is possible to execute a macro on any given file directly from the command line, which is very good!

One big problem with this though is that I haven’t been able to find any way to provide parameters for this macro from this same command line – how can this be done?

A simple example:
I have a macro that will delete every n:th line from the current file, and I want to be able to provide this “n” value (i.e. so that it can delete for example every second line, every third line, every fourth line etc, based on my current choice).

This must be possible somehow, right? But how? I cannot find anything like this in the EmEditor command-line reference?

]]>