For updates, you should follow me on

Selecting a value from a list

A new variant of the input command has been added in version 2.0...

Each input name should be lowercase, begin with a letter and contain letters, numbers and the underscore character.


Every time a *list parameter is ecountered, UP Deck will attempt to load the specified list from a text file and store it in the deck.  If the file can't be loaded, the previously loaded version will be used if it exists.  This allows you to load a file from one PC and then continue to use it when connected to other machines that don't have a copy.



UP Deck looks for a 'StarWars.txt' file in the lists folder.  If you click the 'FILES' button on the desktop app, the application's folder is opened on the desktop.  There should be a folder inside named 'Lists' - this is where you should save your text files.



The example StarWars.txt file contains the following;


Luke Skywalker
Obi-Wan Kenobi
Darth Vader
Han Solo
Princess Leia




You can also create lists with values and labels : you pick from the list of option labels and the value for that option is returned. To set this up, create a list like the one below. Every line that has a value and a label should begin with a ':' (colon). The value comes after the colon, then another colon followed by the label.


:1:Luke Skywalker
:2:Obi-Wan Kenobi
:3:Darth Vader
:6:Han Solo
:7:Princess:Princess Leia
Using the list above, selecting 'R2-D2' would return the value '4'.  Values don't have to be numeric, they just can't contain a colon character.  Only the labels are shown in the deck when selecting - the values are hidden.
Example - the following command will ask the user to select from the StarWars list twice. The chosen values will be stored in $player1 and $player2

Get characters from the list









Prev: Asking for user input  
Next: Setting custom values to use in the deck

© 2021