Note: It is possible to damage your computer by using IO port commands without knowing what you are doing. IO port commands are intended for advanced users only. Be sure that you set the Port address to the proper port before reading or writing to the port. This is usually a printer port address.
Special variables and are replaced in Com Port strings and in SendKeys commands as follows:
JUPALT - the current integer values of Jupiter altitude (=elevation).
JUPAZ - the current integer values of Jupiter azimuth.
SUNALT - the current integer values of Sun altitude (=elevation).
SUNAZ - the current integer values of Sun azimuth.
GMTTIME and LOCALTIME are replaced by GMT and local times respectively in the format hhmm. These time variables have been set aside for future use.
CML3 - the current integer value of System III central meridian longitude of Jupiter.
IOPHASE - the current integer value of Io phase angle in degrees.
ACTIVEMODE - If an an Jupiter emission mode is predicted to be active, the name of the mode (such as Io-A) replaces this variable. Otherwise, the variable is replaced with "NONE".
The script engine keeps track of only one other simple numerical variable at a time. The variable is named A and must be an integer value between -32767 and +32767.
//
Lines beginning with // indicate that the line is a remark and will not be
loaded when the script is actually run.
A = (integer)
A = (integer) sets the value of the A variable to the number specified between
the parentheses. You can also assign JUPALT, JUPAZ, SUNALT, SUNAZ, CML3, and
IOPHASE values to A, by placing one of these variable names within the
parentheses.
AND A with (integer)
The value contained in the A variable is logically ANDed with the parameter
integer. The result is placed in the A variable.
Activate (TitleString)
If a program is already running on your computer, it can be given
"focus", that is made the active window, by this command. The
parameter TitleString is the caption that is displayed in the desired program's
title bar. This is not necessarily the same as the name of the program. You
should Activate a program before sending keystrokes to it.
Com_ComPort = (ComPort)
Before sending commands to a serial (Com) port you need to tell the script which
com port you will be using. The parameter Comport should be replaced by the
number of the port, usually 1 - 4. Also see the Com Set Com = command which must
be initialized before sending things to the com port.
Com_Send Byte (byte)
Send a single binary byte to the com port. Useful for situations where the
desired value is not a typical string character. Byte should be a value between
0 and 255.
Com_Send String (string)
Sends a string to the com port. Replace the string placeholder with the actual
characters you want to send. If you need to send a non-printable character such
as a carriage return or line feed use the Com_Send Byte command. Since the
primary use for this function is to send position information to an antenna
controller, two words have been reserved for this purpose. JUPALT will be
replaced by the present Jupiter altitude in degrees. JUPAZ will be
replaced in your string by the present Jupiter azimuth in degrees. See
FormatLeadingZeros and NoFormatLeadingZeros commands for how these positions
will be formatted.
Com_Set Com = (9600,N,8,1)
Sets up the com port parameters of baud rate, parity, word length, and stop bits
in the order they appear between the parentheses), Perform this function before
using the com port unless the default parameters for the port are adequate.
Com_Close
You should use this command to close the com port after using the port in your
script. This should be done right before the script ends. Failure to close the
port may cause problems the next time your script runs and an attempt is made to
open the port.
The next four commands are used to send commands to a program using DDE (Dynamic Data Exchange). Only applications written to accept DDE can be affected. Some antenna rotator interfaces accept DDE commands. Before a DDE_Send command can be invoked, DDE_App, DDE_Topic, and DDE_Item parameters must be set. Consult the documentation of the DDE source program (the program you want RJP to communicate with) to find out what these values should be. See DDE example page for a better explanation.
DDE_App = (Application Name)
Takes the source application name as a parameter.
DDE_Topic = (Topic)
Takes the DDE link topic as a parameter.
DDE_Item = (Item)
Takes the DDE link item as a parameter.
DDE_Send (string)
After setting the App, Topic, and Item parameters use DDE_Send to send
information to the source program. Information is sent using the LinkPoke
method. The source application must be capable of receiving information by this
method.
Exit Script
Forces an exit of the script. Use this command following a comparison command to
exit the script if certain conditions are or are not met. For example;
A = (SUNALT)
IF A< (10) Then
Exit Script
Instructions that move antenna...
This will exit the script when the Sun's elevation is below 10 degrees so that the antenna will not be moved under this condition.
If A < (integer) Then
If the value in the A variable is less than the specified integer value,
then the next command line is executed, otherwise, the next command is skipped.
If A = (integer) Then
If the value in the A variable is equal to the specified integer value,
then the next command line is executed, otherwise, the next command is skipped.
If A > (integer) Then
If the value in the A variable is greater than the specified integer
value, then the next command line is executed, otherwise, the next command is
skipped.
FormatLeadingZeros
Used to add leading zeros to SUNALT, SUNAZ, JUPALT and JUPAZ strings as required by some
antenna rotator controllers.
NoFormatLeadingZeros
Specifies that no leading zeros will be added to SUNALT, SUNAZ, JUPALT or JUPAZ strings.
NoStopOnError
If an error occurs in a script it is ignored and the script continues to the
next command.
OR A with (integer)
Logically ORs the value held in the A variable with the value specified by the
integer parameter. The result replaces the value in the A variable.
Pause (Duration Secs)
Creates a pause in the script of Duration Seconds after which the script
continues to process.
Run (Executable)
Runs the program specified by the Executable parameter. This should include the
path of the program unless the program path is known by the operating system.
SendKeys (String) NOWAIT
Sends keystrokes to the program that has focus. There are a number of special
keystroke reserved words and symbols which in effect give total keyboard
control. Study the SendKeys reference for a complete explanation. The
NOWAIT parameter tells the script not to wait for the keystrokes to be processed
before continuing. Remove the NOWAIT parameter to force the script to wait for
the keystrokes to processed before continuing on.
StopOnError
Tells the script engine to abandon processing when an error occurs in the
script.
Wait Until (HH:MM:SS GMT)
Script pauses operation until the specified GMT time is reached. Replace
HH:MM:SS with the properly formatted time (use leading zeros where appropriate).
Eliminate the GMT part of the placeholder.
Wait Until (MM/DD/YY GMT)
Script pauses operation until the specified GMT date is reached. Replace MM/DD/YY
with the properly formatted time (use leading zeros where appropriate).
Eliminate the GMT part of the placeholder.
While (BIT) HIGH Inp A
Causes script to monitor a particular bit on the specified input port and wait
for it to become high. After the bit (0 to 7) becomes high the value of the
input port is transferred to the A variable.
While (BIT) LOW Inp A
Causes script to monitor a particular bit on the specified input port and wait
for it to become low. After the bit (0 to 7) becomes low the value of the input
port is transferred to the A variable.
XOR A with (integer)
Logically XORs the value held in the A variable with the value specified by the
integer parameter. The result replaces the value in the A variable.
io_Inp A
The value present at the set IO port is read and transferred to variable A.
io_Out A
The value in the variable A is transferred to the set IO port.
io_Port = (Port)
Sets the address of the IO port used by any IO functions.
Related Topics: SendKeys Reference, Script Editor,
Automation Parameters, DDE Example