#22366
LifeTimer
Participant

Hello Mr Emura, and thanks for your reply.

I’m not quite sure I understand what you mean though, or that I managed to explain my problem/goal to you properly.

What I want to accomplish is this:

With a single command-line (i.e. from outside EmEditor, from the normal cmd.exe command-line) I want to:

1. Open EmEditor with a certain text file (which is of course done simply by specifying the path to the file on the command line after “emeditor.exe”).
2. Execute a certain macro on this file (which can be done using the “/mf” switch).
3. Provide this macro with some further parameter data before it executes (which is what I’m asking you here how it can be done from the command-line???).

As I stated in my initial post above, such a macro could for example be one that will delete every n:th line from the current file, and I then want to be able to provide this macro with the “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).

The command-line would then be as follows for deleting every third line from the file “c:\some_dir\some_target_file.txt”, and then displaying the result in EmEditor:

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

The “-macroparam” switch is something I made up just now, as an example for how this could be done, and what I’m asking you is if some similar way to provide parameter data to macros directly from the command-line already exists in EmEditor today (or how I otherwise could accomplish this)?