GHS is nothing without macros.  They expand GHS into a repeatable and adaptable programming language.  They make all the frustration worth the effort.  The GHS user that masters macros can harness the full power of computer automation for stability and hydrostatics.  These free tutorials show you how.


810 Macros

Macros are the fundamental basis for scripting and automation in GHS.  Macros are the programming equivalent of functions.  They are a block of code that can be reused multiple times in the program, with only a single definition.  They can even have inputs.  This tutorial introduces the basic concepts of macros and how to use them in GHS.



820 Variables

This tutorial explains how to create and use variables in GHS.  Covers the two primary data types that get used for variables.

  • REAL variables
  • STRING variables

The tutorial also explains in detail how to use variables for basic mathematical operations in GHS.  This is fairly important because, unlike other programming languages, GHS does not respect order of operations.  You must be very careful to code your equations into GHS in the correct sequence to manually control the order of operations.  This tutorial provides an example of how to do that.


830 Flow Control

How to use GHS programming for flow control.  This includes creating loops and using if-then statements for basic decision capability.  Also provides a useful example of how to combine loops with if-then statements to automate a damage stability analysis.


840 Keyboard Shortcuts

Shows how to create custom keyboard shortcuts in GHS. This is the beginnings of creating your own user interface in GHS.  This tutorial allows you to create your own custom macros and then assign them to custom keyboard mappings.


850 GHS Templates

Templates in GHS are actually custom user forms.  A GHS template is like a macro.  But instead of defining a command sequence, you are defining a user form to extract user input.  This tutorial covers how to define those user forms.  Also covers some basic user input controls, including the following items.

  • Text
  • Variable inputs
  • Drop down lists
  • Part selections
  • Execution buttons
  • Buttons to close the user form