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
Variable types
String
The string variable can hold any string of text.
Example:
Store.StringAt.SampleString = "Hello world!";
or
Store.At.SampleString = SimpleString {String="Hello world!";};
The name "SampleString" should be replace with a more descriptive variable name. If the variable does not exist it is created, otherwise the current variable is overwritten.
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;
or
Store.At.SampleFloat = Float {Value = 3.141;};
The name "SampleFloat" should be replaced with a more descriptive name. If the variable does not exist it is created, otherwise the current variable is overwritten.
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 = "";
Lots of scripting stuff to add