Creating Custom Scripts in LCDStudio

GX and Typhoon hardware, this includes, displays, cables and accessory cards.

Moderator: Mods

Post Reply
Daniel Divino
Matrix Orbital
Matrix Orbital
Posts: 87
Joined: Thu Sep 24, 2015 9:38 am

Creating Custom Scripts in LCDStudio

Post by Daniel Divino » Thu Feb 18, 2016 11:07 am

To customize the information displayed on your GX, you'll first need a plug-in to get the desired information from your specific program. Many plug-ins have already been written for popular programs, please see the LCDStudio forums for a complete list. For plug-ins that don’t already exist, the LCDStudio site contains both a request thread, and a how-to on plug-in creation. In either case, it is a good idea to research API and/or SDK information about your program to understand what information it makes available to the outside world, and how. When scripting a custom variable, you can retrieve data information using a plug-in and program what you would like to do with that information. The following example provides instructions on how to take data from a gmail plug-in.

Using a gmail plug-in, a script can be created to display new, unread email messages. You’ll need to install the gmail plugin in order to retrieve data from your gmail. Once the plug in is installed, follow the steps below to display data onscreen.

First, go to the "Data View" tab in LcdStudio. You can right click in the area and the option saying "Add Custom Variable" should pop up. Here, under "Tree location", you can provide the name of the new Tree that will be available on the left hand side. The "Key" is used to reference the custom variable in the design files. Once your "Tree" and "Key" have been written, you can press "Ok". A new window will open up allowing you to write your own code and drag and drop data items.
Custom Data Editor.jpg
Custom Data Editor.jpg (102.79 KiB) Viewed 957 times
The next step is to get the email data. First, select the data you want to display. This could either be the last message author, or the time you received your newest email, etc. Attaining the data is simple. All you have to do is select the data from the data tree, and drag it into the script window. For example, to attain the last message time data, you simply open open up the GmailPlugin in the data tree. Then you click and drag the “LastMsgTime” into the scripting area. Get data code will be generated for you once this is done. You can use the “Test” button to see what will be returned. Once this is done, you can change the key name, and the tree location. You can then drag this new custom item to your display and the message time of your newest email will be displayed on screen.
GmailScript.jpg
GmailScript.jpg (49.67 KiB) Viewed 957 times
Daniel Divino
Technical Support
Matrix Orbital

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest