ZTree.com  | ZEN  | About...  

 Index   Back

[ZEP] Macro Suggestions   [ZEP]

By: Art Kocsis     So Calif  
Date: Oct 16,2016 at 11:16

Macros are a very useful and powerful ZTree tool and I (and maybe others), don't use them enough. Here are a few suggestions to encourage and make them easier to use (hopefully, at least the first two will be easy to implement). I thought of these enhancements after creating a macro and found I needed to add a couple of missed commands. Instead of a simple edit within ZTree, I had to resort to an external text editor for the corrections and then return to ZTree to test them. This should be a better way:

(1) Enable quick display of macro code to allow easy viewing/editing of same.

After pressing F12 (or other means), to display a file name in the macro input line, press F7 to replace the file name with its contents. (I suggest F7 as it is unused here and is the same key used to view file content in FW mode - a similar function.)

This would enable a simple and convenient way to view/edit/mod/correct a macro without having to load, edit and save it with an external text editor. This removes (or at least reduces), the need for a third party program and keeps the functionality wholly within ZTree.

Of course, it would be nice to have this functionality for multi-line macros (loaded from files). Since a plain up or down arrow accesses history, the arrow keys will need a modifier to span a file. Similar to CTL-Left & Right moving the cursor horizontally by words, using CTL-Up & Down to move a single line "view-port" vertically would be similar and intuitive. The single line would, of course, be displayed (and be editable), in the macro input line.

(2) Implement a save-as command after macro edits or text-mode macro input.

After typing in (or editing), macro code there is no way (that I see), to save the text to a file (which seems strange so maybe I am missing something).

A save command ("Save", function key or ???) in the macro menu would invoke the "Save macro to filename.ztm" function. There is no real need to stay in the edit mode afterward as a simple F12,F7 would quickly bring back the macro code to the input line. It is also consistent with ZTree's philosophy of stateless, single function commands.

Putting (1) and (2) together:

• Independent of the source, whenever a macro filename is present in the macro input line, F7 would recall and display the associated macro text. (This includes the "save-as" zsave.ztm after a CTL-F12 recording, a macro filename recalled from history or even just typed in.

• Independent of the source, whenever macro text is present in the macro input line, offer a "save-as" option (function key, "Save" or ???).

(3) Implement single-step macro execution.

This would be very useful for macro development and debugging - either from literal code or via a macro file name in the input line.

Also, display the current macro command and macro code character position (R:C), at screen bottom and replace the "p" with "ss" in the display.

Single step could (should?) be limited to F12 mode only; Command line and Alt-F12 single step execution does not make that much sense.


Namaste', Art

Press any key to exit,
Press any other key to continue...
- unknown

876 views      
Thread locked
 

Messages in this Thread

 
96,637 Postings in 12,231 Threads, 350 registered users, 54 users online (0 registered, 54 guests)
Index | Admin contact |   Forum Time: Mar 28, 2024 - 3:36 pm UTC  |  Hits:62,371,681  (24,078 Today )
RSS Feed