Jump to content
UBot Underground

Saved Element Image Being Overwritten


Recommended Posts

Hello,

 

I'm trying to save an element image on a loop so that I continually save the images I download with the corresponding product title. The problem is, is that it continually save each image while the bot is running, but it overwrites the last saved file so there's always only one images being saved in the folder. On top of that, it's not changing the filename with the "next list item" in which it gives the image the same file name as the product. Here's the code:

 

save element image(<style="width: 320px;">,"C:\\Users\\Home\\Desktop\\SonnysImages\\{$next list item(%ProductImageFileSaveTitle)}.jpg")

 

Do you know what the issue could possibly be? Thanks.

Link to post
Share on other sites

This works for me on the Ubot resources page:

add list to list(%ProductImageFileSaveTitle,$list from text("one
two
three","
"),"Delete","Global")
loop($list total(%ProductImageFileSaveTitle)) {
    save element image(<style="float: left; margin: 3px 10px 0px 0px; height: 61px; width: 75px;">,"{$special folder("Desktop")}/{$next list item(%ProductImageFileSaveTitle)}.jpg")
    wait(1)
}
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...