Pinnacle : Scripting
Table of Contents
Basics
Run Pinnacle from the Command Line
This will allow the user to see script output (e.g. “echo”) and errors generated while scripting.- Open an Xterm window
- In the window type StartPinnacle
Store
Variables
String
The string variable can hold any string of text. Example:Store.StringAt.SampleString = "Hello world!";
Store.At.SampleString = SimpleString {String="Hello world!";};
Float
The float variable is the only type of numeric variable available in Pinnacle scripting. It can hold most numbers but is limited to [Unknown]. Example:Store.FloatAt.SampleFloat = 3.141;
Store.At.SampleFloat = Float {Value = 3.141;};
Reference
List
Store
Delete variables
Delete string and float variables using the FreeAt or RemoveAt command.Store.FreeAt.TempFloat = "";
Store.FreeAt.TempString ="";
View all variables
For this code to run properly, P16 and newer versions require that Windowlist be replaced with XtWindowList. The following code will determine which Pinnacle version is use and automatically use the correct syntax.[1]Store .FloatAt .VersionNumber = Version;
IF .Store .FloatAt .VersionNumber .LESSTHAN .#"#15" .THEN ={
WindowList.StoreEditor.CreateStoreEditor = "Store.Address";
WindowList.StoreEditor.Unrealize = "";
WindowList.StoreEditor.IsModal = 1;
WindowList.StoreEditor.Create ="";
};
IF .Store .FloatAt .VersionNumber .GREATERTHAN .#"#15" .THEN ={
XtWindowList.StoreEditor.CreateStoreEditor = "Store.Address";
XtWindowList.StoreEditor.Unrealize = "";
XtWindowList.StoreEditor.IsModal = 1;
XtWindowList.StoreEditor.Create ="";
};
Store .RemoveAt .VersionNumber = "";
Bibliography
1. Riis, Bjorne. Pinnacle3 Listserve. https://groups.google.com/d/msg/pinnacle3-users/CFKYI6Ew-bw/ceOiEG9HBgAJ