General HydroStatics
Ship Stability Software
Command of the Week
(New or interesting aspects of GHS that you may not know about)


In GHS, a "template" is a command structure that specifies a "dialog box," which can appear on the screen as part of the user interface.

Templates and their screen images have appeared often in these Command-Of-the-Week posts—without much explanation except by example.

For another example, a template can display a picture as in the following sequence of command lines. A box pops up on the screen displaying whatever graphic is in the file PIC.JPG:


It is important to understand that the template's window remains until the user closes it, and processing of commands halts until the user takes some action.

Then what good is this week's featured command? How can TEMPLATE /REFRESH be executed when command processing is suspended?

Last week's COW suggests a way this can be accomplished: a concurrent GHS session could do MESSAGE SEND TEMPLATE /REFRESH which would cause the SHOWPIC template in the example above to read PIC.JPG again. If we arrange for PIC.JPG to embody a different image by that time, then we can cause the image on the screen to change without the user's intervention.

How about using DIR /MACRO (which was featured in cows/030) to change the contents of the image file? Taking these three ingredients and adding some thought, you have everything you need to make a slide show—not that you need one, but you might like the technique used in this Run file.

Questions, comments, or requests?
Contact Creative Systems, Inc.

USA phone: 360-385-6212 Fax: 360-385-6213
Office hours: 7:00 am - 4:00 pm Pacific Time, Monday - Friday

Mailing address:
PO Box 1910
Port Townsend, WA 98368 USA

Click here for an index to this and previous COWs