Jump to content



Photo

Save Image


  • Please log in to reply
2 replies to this topic

#1 mehcul

mehcul

    Newbie

  • Members
  • Pip
  • 7 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Standard Edition

Posted 07 January 2018 - 05:01 AM

Hello,

 

i want to save a screenshot of a side and the name of the picture should be the result&date&time&second but i dont know how to do that.

i try at random.org

The result is at the picture 100 so thename of the jpg should be 100&date&time&second.jpg

 

for helping i would be thankfull.

regards

mehcul

Attached Files


Edited by mehcul, 07 January 2018 - 05:01 AM.


#2 Code Docta (Nick C.)

Code Docta (Nick C.)

    Member for Hire

  • Fellow UBotter
  • PipPipPip
  • 1439 posts
  • LocationIn a Python or UBot IDE or ubotdocta.com
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 07 January 2018 - 11:31 AM

simple enough
:)

comment("using browser 21

above go to \"Tools\" >> \"Options\"

browser, and change the browser to 21 and restart ubot")
navigate("https://www.random.org/","Wait")
wait for element(<name="true-random-integer-generator-button">,15,"Appear")
click(<name="true-random-integer-generator-button">,"Left Click","No")
wait for element(<id="true-random-integer-generator-result">,15,"Appear")
set(#result,$scrape attribute(<id="true-random-integer-generator-result">,"innertext"),"Global")
comment("saves to desktop
just replace wtih Application\\name of folder

this will be in the same folder as your bot inside the directory
name of folder")
save element image(<id="true-random-integer-generator">,"{$special folder("Desktop")}\\{#result}-{$replace($replace($plugin function("DateTime Manipulation.dll", "$datetime manipulation", $date, "UBOT", "Sortable date/time", "en-US", "en-US"),"T","-"),":","-")}.jpg")
comment("00&date&time&second.jpg")
navigate("{$special folder("Desktop")}\\{#result}-{$replace($replace($plugin function("DateTime Manipulation.dll", "$datetime manipulation", $date, "UBOT", "Sortable date/time", "en-US", "en-US"),"T","-"),":","-")}.jpg","Wait")
stop script
comment("replaces T with -

stakced inside the following replace

just replace with & if you wish")
alert($replace($plugin function("DateTime Manipulation.dll", "$datetime manipulation", $date, "UBOT", "Sortable date/time", "en-US", "en-US"),"T","-"))
comment("replaces colon with -")
alert($replace($replace($plugin function("DateTime Manipulation.dll", "$datetime manipulation", $date, "UBOT", "Sortable date/time", "en-US", "en-US"),"T","-"),":","-"))

you will need a plugin to make it easier

datetime manipulation plugin from here

Attached File  random dot org.ubot   1.4KB   3 downloads

 

Using another browser may cause the browser to freeze.

 

Regards,
CD


UBot Expert Tutorials

 

ubot-docta-header-ubot-expert-store.png

 

UBot expert tutorials and documentation at codedocta.com


#3 mehcul

mehcul

    Newbie

  • Members
  • Pip
  • 7 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Standard Edition

Posted 08 January 2018 - 06:17 AM

Much thanx Code Docta, always fantastic. :wub:






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users