Jump to content
UBot Underground

Recommended Posts

I'm creating a bot that goes through a list of URLs in one column, saves the fastest suggested route in google maps to the next column, and then saves a screenshot of the map to the third column.

 

I'm having the hardest time trying to save an image to a table cell.  Is there any way to go about this?  Any help would be greatly appreciated!

 

Here is my code:

navigate("maps.google.com", "Wait")
click(<id="d_launch">, "Left Click", "No")
create table from file("C:\\Users\\Katelynn\\Desktop\\addresses.txt", &my table)
set(#row_num, 0, "Global")
clear list(%places)
loop($table total rows(&my table)) {
    type text(<id="d_d">, "Current Location", "Standard")
    type text(<id="d_daddr">, $table cell(&my table, #row_num, 0), "Standard")
    click(<name="btnG">, "Left Click", "No")
    wait for browser event("Everything Loaded", "")
    set table cell(&my table, #row_num, 1, $scrape attribute($element offset(<class="dir-altroute-inner">, 0), "innertext"))
    change attribute(<id="d_d">, "value", $nothing)
    change attribute(<id="d_daddr">, "value", $nothing)
    increment(#row_num)
}
save to file("C:\\Users\\Katelynn\\Desktop\\googlemaps.csv", &my table)

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