Jump to content
UBot Underground

Lists value used as a key for table


Recommended Posts

I'm trying to get the equivalent of this to work in Ubot Studio (standard)... 

 

 

$ui_list = array('AL','AK','AZ'); // etc

 

$subdomains = array('AL' => 'alabama','AK' => 'alaska','AZ' => 'arizona');

 

$domain = $subdomains[current($ui_list)].".example.com/";

 

 

...Since ubot arrays don't seem to support key=>value pairs I think I have to use tables but am not sure how to this.

Link to post
Share on other sites

The set table cell command won't work because I'm trying get column from value from the table not set a value. What I'm looking for is something similar to the set list position function but instead of using the row number I'd like to set the list position based on the value of a column. Then get the value of another column in the corresponding row.

Link to post
Share on other sites

There's actually a couple of ways you can probably do what you need with tables.

 

Option 1) Try looping through through a table until you find what you are looking for. Now you have the index and can modify/read the columns as needed.

Option 2) Use the "$table search" function to do a search on the table and return the index where it was found. Then you can modify/read the columns on that row as needed.

 

I don't have time right now to put together an example, but if you still need help later, I'll throw something together for you.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...