Skip to content

Instantly share code, notes, and snippets.

View paragontechgroup's full-sized avatar

paragontechgroup

View GitHub Profile
@paragontechgroup
paragontechgroup / cf-global-tokens.txt
Created November 8, 2011 16:09
Command Fusion Global Tokens
// 1) Created global token (in global token manager) called "ProcessorPort" with default value 8020 and checked persist.
// 2) Created system called "Localhost" to 127.0.0.1
// 3) Created setup page with text input field with serial join 9999 with command "setPort" in "Send Value Actions > command"
// 4) Created command in "Localhost" system called "setPort" with following Javascript:
CF.setToken(CF.GlobalTokensJoin, "[ProcessorPort]", "[@s9999]");
// 5) Made button on setup page called "What is my port" with code:
CF.getJoin(CF.GlobalTokensJoin, function(j, v, tokens) { var guiPort = tokens["[ProcessorPort]"]; CF.setJoins([{join: "s590", value: guiPort}]); });
// This grabs the global token "[ProcessorPort]" and displays it in serial join s590 for testing. All works like a champ until I restart guiDesigner. I'd assume that from a fresh start and navigating to the setup page and pressing the "What is my port" button that the set persistent global token value would be displayed. Also, even from a fresh start p