PMGlobe, version 3.31 | 3 Aug 2009 |
[previous | contents | next] |
set sunlight oncauses the globe image to be drawn with sunlighting (just as though ‘sunlight’ had been selected from the Imagery menu). For every command, the first word is the command verb (set, in this case) and the following words are arguments to the command. Similarly,
set sunlight offturns sunlighting off.
The command dialog can be hidden (closed) by clicking on the close box or the Cancel button, or by pressing the Esc (Escape) key.
There are two check boxes in the dialog:
Note that closing the console using its titlebar options will also exit PMGlobe.
A macro is invoked either from the command dialog (by typing the name of the macro) or by using the ‘Run Macro...’ selection in the Options menu. This latter selection will bring up a normal Windows file dialog which will let you choose the macro to run.
You can also have a macro run automatically when PMGlobe is started by specifying ‘macro filename’ as a parameter to the PMGlobe call, for example:
start pmglobe macro triangle
The first line in a command-list macro must be a comment; this is used to distinguish command-list macros from Rexx macros.
Here is a simple command-list macro, called triangle.pmg (the numbers on the left identify the lines of the macro and do not appear in the macro file):
1. ; triangle.pmg: draw a triangle on the Globe 2. 3. set drawcolour red 4. gmove 0 0 5. gline 0 90 6. gline 90 0 7. gline 0 0Line 1 is a comment which describes the macro. It, and the blank line 2, have no effect on PMGlobe.
Line 3 sets the colour for drawing on the globe to Red.
Line 4 (the graphics move command, gmove) moves the current point for graphics to latitude 0, longitude 0 (the coordinate system origin, a point off the coast of Africa).
Lines 5 through 7 are three graphics line commands (gline). Each of these draws a line, using the current drawing colour, from the current point to the point specified on the gline command, and then sets the current point to be the end of the new line.
Any of the commands described below, except extract, can be used in command-list macros.
In addition to issuing commands, macros using the Rexx language can use the full power of the Rexx language to program PMGlobe. A description of the language is outside the scope of this document, but here is a simple example:
1. /* myzone.pmg - display timezone in the titlebar */ 2. 3. -- get PMGlobe version and timezone name 4. ’extract version zonename’ 5. 6. if zonename=’???’ 7. then ’message Time zone is unknown’ 8. else ’set title PMGlobe’ version’, in’ zonenameHere, lines 1 through 3 are commentary. Line 4 then uses the extract command to get the current values of the PMGlobe version number and time zone name. As long as this is valid, the text of the PMGlobe window’s title bar is then set, perhaps to: PMGlobe 3.10, in GMT Daylight Time.
Rexx macros are run in the same way as command-list macros, but may have argument words passed to them from the rest of the command (these can be retrieved using parse arg or the arg() function in Rexx).
[1] | For some reason, Windows generates a tone when these are used, but they should function correctly. |
[2] | See: http://en.wikipedia.org/wiki/REXX |