Jump to content
UBot Underground

Variable / Increment Table Location?


Recommended Posts

Hi everyone... I'm a total Ubot newbie, and pretty much a programming newbie in general.  I'm using community edition, so unfortunately I don't think there's a way to view or post my source.  I'm attempting to:

 

  • Search a website using search strings from a CSV, loaded into a table
  • Screen-scrape several pieces of data from the search results
  • Append the scraped data to the table row from that search string, and save to CSV
  • Increment down to the next row, and repeat the process

So far, I've figured out:

  • the searching and screen scraping, including adding my scraped attributes to a list. 
  • Using a variable to load the search string, which will presumably allow me to increment and repeat (although I haven't gotten as far as incrementing and looping yet).

My problem comes in when I try to "add list to table as row".  I want to append an existing row at a given column, and increment down to the next row / same column with the next increment.  I'm having difficulty telling "add list to table as row" what coordinates to add at, in a way that can be incremented.

 

I've tried "add list to table as row" with a starting row/column as a variable I created with $table cell, but that's returning the contents of that location (blank) instead of the coordinates.  This causes "conversion from string "" to type 'integer' is not valid", because of the blank cell contents.  It's almost like I need to create a variable using "set table cell" so I can increment that, but I can't set a command in a variable.

 

Can anyone help a newbie out?  Is there a plugin that would make something like this easier?  Or is adding a list to a table the wrong way of going about this?  Thanks!

Link to post
Share on other sites

You can set a variable for row and column and keep track of them as you add to the table.

 

These functions might help as well:

 

http://wiki.ubotstudio.com/wiki/$table_total_rows

http://wiki.ubotstudio.com/wiki/$table_total_columns

 

Just keep in mind that if the total rows are 5 then the last row is actually row 4 (because 0 index) so if you want to add a new row then row 5 is fine and you don't need to increment that.

Link to post
Share on other sites

That's the problem that I'm having... how do I set a variable for row and column location only?  I'm currently trying to use $table cell in my variable, but that's returning the contents of the specified cell instead of just specifying the location. $table total cell and $table total columns will be useful to me later when I'm trying to close the loop, but they aren't what I need right now because I'm attempting to append to existing rows and columns.

 

Edit:  I just found a tutorial video that I think shows how to do it from within a loop command.  I won't have a chance to play with this until tomorrow, but it looks like exactly what I'm trying to do is shown around 7:30.    https://www.youtube.com/watch?v=e7ZwxZ1RtjI

Edited by mr_camera_man
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...