Jump to content
UBot Underground

Working With Tables And The New Thread Spawn Command


Recommended Posts

Hi there,

 

I am wondering what everyone else is doing to cycle through rows of a table with the new thread spawn command?

 

For instance, if you have a table which has a username and password.

 

How are you handling this with the Thread Spawn command?  It's not clear to me how the command works behind the scenes to know when to increment the #position variable for table rows.

 

Any insight anyone can offer would be great.

 

Thanks,

Cnotey

Link to post
Share on other sites

Probably a better way of doing it,but pass the threadspawn,the row/column number from a list,and in your function,refer to that number,example

 

run code below

 

set(#position,0,"Global")
add item to list(%TableItems,"a","Don\'t Delete","Global")
add item to list(%TableItems,"b","Don\'t Delete","Global")
add list to table as column(&myTable,0,0,%TableItems)
define Passing item to function(#num) {
    alert($table cell(&myTable,#num,0))
}
loop($table total rows(&myTable)) {
    add item to list(%items,#position,"Don\'t Delete","Global")
    increment(#position)
}
thread spawn($table total rows(&myTable),1) {
    Passing item to function($next list item(%items))
}

Link to post
Share on other sites

Yea, I don't know about you guys but sometimes I have some crazy tables with 10+ columns in them.  Splitting into lists is not an option.  Especially when running through 10k+ rows, I want to make sure my data doesn't get mix-and-matched.  But thanks for the suggestion!

Link to post
Share on other sites

" doing to cycle through rows of a table"

 

above is to reference the row number {#num} as it cycles through the rows of a table

the script alerts A(row number 0) followed by B(row number 1)

the size of the table makes absolutely no difference,

amount of columns make no difference either

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...