understanding touch portal - autolog/TouchPortal GitHub Wiki
The purpose of this page is to provide some explanation as a supplement to the Touch Portal documentation in order to understand how Touch Portal works. The important thing to understand at the outset is that Touch Portal was not designed to function quite in the way that we are using it with the plugin -- although to be fair, that statement is not meant to diminish Touch Portal and is becoming less correct over time. Touch Portal was initially designed to be used to construct "second screens" (or perhaps a software-based alternative to an Elgato Stream Deck) in order to be able to more easily control computers and their software. As a simple example, imagine you are creating creating YouTube content and you have a setup with multiple cameras. You could create a page with two buttons--one for each camera--making it easy to switch between the two. Another example would be to assign a button to simulate a keypress combination to activate a software function.
- On Press
"On Press" instructions are processed when a Touch Portal button is pressed. - On Event
"On Event" instructions are processed when something else happens. - On Hold
"On Hold" instructions are processed when a Touch Portal button is pressed and held.
Users of Touch Portal can create what are called custom states (like Indigo variables) to store information. These states can then be used as criteria for logic embedded in Touch Portal buttons. These states are available globally within Touch Portal and each one's name must be unique. Users can also update the values of custom states from within Indigo by using a Touch Portal Plugin Action.
Touch Portal also supports plugin states. These are states unique to our plugin and are used to store information on things like the status of controls. For example, you might have a button to represent a lamp and we use a state to store the on state of the lamp in Touch Portal. Users can not affect the value of plugin states directly.
See tutorials for some examples to get you started.