colton 13 Posted April 7, 2013 Report Share Posted April 7, 2013 Is there a way to set constants by name in a list or table like with normal coding? Essentually... UI Drop DownExample1Example2Example3 Example100 Variable Stored as tempVar Pull list Example1 = testingExample2 = sampleExample3 = dogExample100 = cat Display value from list(tempVar) Quote Link to post Share on other sites
VaultBoss 310 Posted April 7, 2013 Report Share Posted April 7, 2013 Write them to a .txt file and load them from disk whenever you start the bot. Quote Link to post Share on other sites
colton 13 Posted April 7, 2013 Author Report Share Posted April 7, 2013 The file would have to consist of the name and the value. You wouldn't be able to assign a.value to a name that way would you? Quote Link to post Share on other sites
VaultBoss 310 Posted April 7, 2013 Report Share Posted April 7, 2013 You can assign anything that the .txt file would support. You can't store an image in a text file, normally... although there could be workarounds to that. But to store data like Name - Value pairs as you wish, it is perfectly fit. You might want to use a .csv format instead of .txt, to separate the two values of the pair on each line of text, with a comma - that way being able to load all the data at once into a UBS table... Hope this helps. Quote Link to post Share on other sites
colton 13 Posted April 9, 2013 Author Report Share Posted April 9, 2013 I'll have to play with this one but that would probably work just fine. Thanks. Quote Link to post Share on other sites
J Bot 5 Posted April 20, 2013 Report Share Posted April 20, 2013 If you have an aversion to text files, or if you find you would need numerous text files, you could use the sqlite plugin and just create a database to pull pre-defined constants from. Within an sqlite db, you can create multiple tables instead of having multiple text files. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.