Ship Stability Software
Command of the Week
(New or interesting aspects of GHS that you may not know about)
In a previous COW, the KEY command was employed to convert the keyboard into a
12-note piano with autoplay capability. If you missed it, check out
and be sure to download the run file. As amazing as that COW was, it may have fallen
short of offering a realistic use case for the KEY command.
This COW will demonstrate a quick time-saving keyboard shortcut that might just improve upon your current GHS workflow. There are some who say the F5 key is the best way to run a file in GHS, perhaps even better than typing the command, or gasp, using the pull-down menu option. Wait, you don't use F5?
A good simple arrangement to use GHS with a run file efficiently is to open the run file in a text editor of your choosing, and open GHS in the folder where this run file is located. Your screen should look something like this.
Want a quick trick to start GHS with the working folder already set to your current location?
Just make an empty text file with an *.RF extension.
The buttons at the very bottom of the GHS window correspond with the keys that have been configured. GHS has the following default function key associations:
1,"HELP *|", HELP
9,"IF NOT EXIST MENU THEN IF FEXIST ^MENU.LIB THEN RUN MENU.LIB|
IF EXIST MENU THEN .MENU ELSE RUN EXECUTIVE.WIZ|", "Menu"
As you can see, the GHS session above has custom keys for GLM_MAKER, LOAD EDITOR, RUN, PRINT PREVIEW, and QUIT. Press the F5 key and you'll see a RUN prompt appear on the screen. You can type a run file name, or if the project has been set to match a run file name, just press enter. You can make this even more efficient, by adding the following line to GHS.LF:
|KEY 5, "RUN |", "F5-Run"|
In the command above, the first quoted string is the action and the second string is the label. Note the pipe ("|") symbol included at the end of the action. This symbol acts as a carriage return and can bind multiple commands to a single key. By adding the pipe to the F5 key, then matching the project name to the run file name, the sequence to update the run file and rerun the file is simple:
|KEY 5, "RUN longrunfilename.run |", "F5-Run"|
By the way, if you never use these key functions in your personal workflow or just don't want to see them, you can save space on your GHS window by entering KEY NOSHOW or turning off "Footer buttons" on the View Menu (see COW206). Note this just hides the footer line... the F5 key still works to run your files!
Now you can have a consistent and efficient way to rerun a run file that you are actively editing. Stay tuned for a future COW about an upgraded text editor!