Load data structures (=lists and tables) internally within a bot
Posted 09 February 2012 - 01:57 PM
Reason: if I for instance distribute a bot freely, then I want to make sure that it works at all times in the ways I can control. If I have the contents of data structures in external files only, they can be altered. I am specifically thinking of things like translation tables between language and language codes, country and country codes etc. It is of course possible to store the files on my own host, but that would create a call to my host for just fetching some simple/static data.
To my knowledge this is not possible to do today.
Posted 09 February 2012 - 02:16 PM
add list to list(%Alphabet List, $list from text("A B C D E F G H I J K L M N O P Q R S T U V W X Y Z", " "), "Delete", "Global") add list to table as column(&Alphabet Table, 0, 0, %Alphabet List) add list to table as column(&Alphabet Table, 0, 1, %Alphabet List)
Although I would like a $Table from text function, so I do not have to have many add list to table commands.
What I do sometimes is have the table in a variable , then write it to file and use the "create table from file" command. Then I would delete the file.
It works , but $Table from text will be easier.
Posted 09 February 2012 - 11:48 PM
table from text is easy.
comma separate your values, and create table, from a variable with the set content comma delimited
How do you do it without writing to file?
Can you give me a code example?
Posted 13 February 2012 - 06:19 AM
TJ, please guide us with your wisdom.
Posted 13 February 2012 - 12:02 PM
by writing the temp file you can then load it into the table currently.
create table from text, or create table from list would be great.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users