Jump to content


Photo

Load data structures (=lists and tables) internally within a bot


  • Please log in to reply
6 replies to this topic

#1 Anonym

Anonym

    Advanced Member

  • UBot Users
  • PipPipPip
  • 497 posts
  • Location127.0.0.1
  • OS:Windows XP
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 09 February 2012 - 01:57 PM

Similar to that you can set the contents of a variable, I think it would be a nice feature to be able to set the contents of data structures (= lists and tables) internally within a bot WITHOUT reading files.

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.

#2 odeesuba

odeesuba

    Advanced Member

  • UBot Users
  • PipPipPip
  • 140 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 09 February 2012 - 02:16 PM

It is possible now , just follow this code

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.

#3 Anonym

Anonym

    Advanced Member

  • UBot Users
  • PipPipPip
  • 497 posts
  • Location127.0.0.1
  • OS:Windows XP
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 09 February 2012 - 03:59 PM

Great! I didn't think of that!

Thanks a lot!

#4 LoWrIdErTJ - BotGuru

LoWrIdErTJ - BotGuru

    Botguru.net

  • Moderators
  • 3245 posts
  • LocationMichigan
  • OS:Windows 7
  • Total Memory:8Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 09 February 2012 - 04:20 PM

table from text is easy.

comma separate your values, and create table, from a variable with the set content comma delimited

Web Automation Bots @ BotGuru.net Want a Custom bot? click here or Email me
rjr.jpg

botgurusecured-banner.png

 


#5 odeesuba

odeesuba

    Advanced Member

  • UBot Users
  • PipPipPip
  • 140 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

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?

Thanks

#6 Anonym

Anonym

    Advanced Member

  • UBot Users
  • PipPipPip
  • 497 posts
  • Location127.0.0.1
  • OS:Windows XP
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 13 February 2012 - 06:19 AM

Yes, I wonder that too. I have tried a lot of different things now, but nothing ends up in a table.

TJ, please guide us with your wisdom.


Thanks!

#7 LoWrIdErTJ - BotGuru

LoWrIdErTJ - BotGuru

    Botguru.net

  • Moderators
  • 3245 posts
  • LocationMichigan
  • OS:Windows 7
  • Total Memory:8Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 13 February 2012 - 12:02 PM

sorry would have to save to file, load it, then delete it..

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.

Web Automation Bots @ BotGuru.net Want a Custom bot? click here or Email me
rjr.jpg

botgurusecured-banner.png

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users