|
Post by George on May 16, 2019 14:00:46 GMT -5
Latest testing info:
OK, we have a way to start a file from the command line and provide a macro to run. If provided, the macro name provided will supersede any IMACRO specified in the File Profile.
It is done similarly to providing an overriding Profile name. So a command line to start an edit of MyFile.txt with macro FRED would be coded as
SPFLite.EXE MyFile.txt @FRED To open the file in VIEW with profile TmpProfile and macro ABCD would be
SPFLite.EXE -VIEW MyFile.txt .TmpProfile @ABCD
i.e. the .name is the Profile name, the @name is the Macro name. If present, these operands must FOLLOW the file name.
And the option to startup with a DO file (-DO Macname) is still present. The DO file is started in the FM Tab.
So, some progress.
George
|
|
|
Post by George on May 17, 2019 10:48:40 GMT -5
Hmmm, forgot about that @ convention, easy to pick another letter (how about %). The parse right now accepts any length for the -XXX operands, but doesn't handle collisions. Until we run out of unique words to use it can stay that way, I'll address revising the parser when I'm forced to. The Profile and Macro operands are unique and MUST follow the filename, which itself MUST follow all -XXX operands. And right now I don't see any pressing need to re-do the parser to adjust this.
Remember it's complicated as well by the filename operand which can be a filename, an FLIST name, or a FilePath/FilePattern request. It's a convoluted piece of junky code already, so whatever works now - stays.
George
|
|
|
Post by George on May 18, 2019 10:21:07 GMT -5
All the -EDIT -BROWSE and -VIEW options are available. As for % not relating to macros; neither does . relate to Profiles yet that's what we've been using for years. I don't think we're stretching things here, any more than what MS did originally by choosing @ for the remote command line - how did THAT relate? They're all just arbitrary characters, they mean whatever we want them to mean.
George
|
|
|
Post by Stefan on Jun 22, 2019 11:20:43 GMT -5
Hi George,
Sorry for leaving this forum unattended for weeks and thank you for working on my request.
I tried a keyboard mapping with the above sequence "=X" assigned to PF4 and it works fine on v10.2.19129. I'm not clear why we need the complexity of a DO command to execute a keyboard macro. Would it not be easier to permit SPF_CMD("=X") or implement a command that effectively does that? But I don't know the internals, so I'll look forward to whichever "shutdown" technique you decide to implement.
In terms of invocation, the ability to add the IMACRO name to a Profile is sufficient. I guess an IMACRO primary command to control that Profile setting would be in keeping with the existing Profile conventions, but is not essential. Neither is the ability to specify the IMACRO as an SPFLite startup parameter. Even if the filename does not present the correct file type (.XXX), one could always override the default Profile on the start request, naming a profile designed to run the required macro. This removes the worries surrounding how to specify the setting, let alone messing about with the pesky parser.
|
|
|
Post by George on Jun 22, 2019 11:57:58 GMT -5
Stefan: Just to summarize whats coming in the next release: - IMACRO as a command to set the IMACRO for the Profile
- An IMACRO field in the PROF EDIT profname dialogue.
- A %macroname command line operand to invoke a macro for the specified file. e.g. SPFLite MyFile.TXT %mymacro The %macroname overrides any normal IMACRO in the file Profile.
- A -DO do-macname command line operand. Specifies a DO macro to be run after initialization is complete. The DO macro will be invoked in the File Manager tab.
George
|
|