Jump to content
UBot Underground

access desktop command


Recommended Posts

i dont know.

 

i dont want to store a jpg i want to go to where a jpg is stored and right click it and then set is a my desk top background. I mean i want ubot to do that. can ubot do that?

Link to post
Share on other sites

Yes, but I just wonder WHY? UBot is primarily a web automation tool. Yes, it IS possible to do Windows automation, but I actually don't see the point of doing this thing - setting a background image - from UBot. I am sorry. :)

Link to post
Share on other sites

Oh, I wouldn't dare that. I take NO responsibilty what so ever, but something like this should work:

 


ui drop down("Delat", "1,2,3,4,5,6,7,8,9,10,30,60", #delay)
clear list(%files)
add list to list(%files, $get files($special folder("Desktop"), "Yes"), "Delete", "Global")
set(#tmp, $text from list(%files, "||"), "Global")
set(#tmp2, $find regular expression(#tmp, "C:\\\\[a-zA-Z0-9åäöÅÄÖ\\s-_\\\\]+\\.(jpg|jpeg|gif|png)\\|\{0,2\}"), "Global")
set(#tmp2, $replace(#tmp2, $new line, $nothing), "Global")
clear list(%imageFiles)
add list to list(%imageFiles, $list from text(#tmp2, "||"), "Delete", "Global")
set(#i, 0, "Global")
loop($list total(%imageFiles)) {
    loop(0) {
        comment("I don\'t want to do this on my PC, if YOU do, just set loop counter above to 1")
        set(#theImageFile, $list item(%imageFiles, #i), "Global")
        shell("regedit reg add “HKEY_CURRENT_USER\\Control Panel\\Desktop” /v Wallpaper /t REG_SZ /d {#theImageFile} /f")
        shell("RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters")
    }
    wait(#delay)
    increment(#i)
}
Link to post
Share on other sites

By the way, it looks for gif,jpg,jpeg and png on the Desktop.

 

I am sure there is another way to filter out these files. I use this approach with regexps since it's fast and works for several file types with just a few calls.

 

Oh, one more thing:  the åäöÅÄÖ in the regexp just reflects the special characters in my mother tongue, you don't need that. :)

Link to post
Share on other sites

ok I'll try that. but it has to access the jpg with out a user interface.  man, i can tell you what I am trying to make. It is not a bot that would sell well.   well....i dont think.   I was going to use it as a give away.

 

Im trying to make a bot the will automatically change the desktop background by simply typing a key word, like cars or puppies or what ever. the user would open the bot, type the keyword and the bot would change the background and loop every 24 hours.  So the user would wake up in the morning to a new decktop background.

 

ok...now I got to shoot ya!  ;)

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