Jump to content

Possible to create an Image Saver?


Recommended Posts

Well after saving images on computers for a while now and getting tired. Also trying to map ctrl to a mouse button and left click (which is slightly faster but still a bit tiring and slow). I thought maybe there's a way to write something that'll save an image.

Here's what I'm imagining it'll do. You'll click on a link that will open the image. Then you activate the script with a button that will save it to wherever on the hard drive (going thru all the screens like the one that asks you where to save it and where you can hit save and cancel).

I think all it needs to do is open the right click menu then choose save image and hit enter.

So I'm just wondering is it possible and where can I look to get started on writing a script like this?

"I thought what I'd do is I'd pretend I was one of those deaf-mutes" ~ Laughing Man ~ GITS : SAC

Link to comment
Share on other sites

What is this for? Is there a long list of images that you need to save?

Where are the links to the images? Are they in an email, website, folder etc...

Where should they be saved to?

MouseClick("right", -1, -1, 1, 1); Right clicks on the link
Send("{DOWN 6}"); Moves down the menu
Send("{ENTER}")
WinWaitActive("Save As", "", 10)
Send("C:\Test\image1.gif"); enters the file name and location to be saved
Send("{ENTER}")

This is just to get you started :whistle:

Link to comment
Share on other sites

Well it can be on the web, an email, FTP server (though usually you can download many at once then). Though I'm an organized guy (at least I like to keep my computer organized). Though it's not that big a deal I could just have the script save it to one main folder and I can move it over. Or I could just take out "Send("C:\Test\image1.gif"); enters the file name and location to be saved" out of the script if I wanted to point where to save it?

Most likely most of the time I'd be saving funny pictures and manga/comics. If they're in thumbnails I'd need to open up the big version of the picture (though I don't need autoit to do that for me..lol).

"I thought what I'd do is I'd pretend I was one of those deaf-mutes" ~ Laughing Man ~ GITS : SAC

Link to comment
Share on other sites

Try InetGet:

InetGet ( "URL", "filename" [, reload [, background]] )

If you're trying to get the images from a website, use InetGet to get the html-code for the website, then use StringInStr etc to search for the filenames of the images from the source code and then again InetGet to save the images to your harddrive.

-juk

Link to comment
Share on other sites

I use this script myself, makes life very easy, you just put the mouse over the pic and it alt-s or whatever hotkey you set

;save web pictures to disk in firefox

HotKeySet("!s", "savePic");alt-s
HotKeySet("!q", "quit");alt-q

Func quit()
    Exit
EndFunc

Func savePic()
    MouseClick("right")
    Sleep(100)
    Send("s")
    Sleep(200)
    Send("{ENTER}")
EndFunc


While 1
    Sleep(100)
WEnd

Exit
Edited by Skorn
Link to comment
Share on other sites

Ah, you were thinking of that kind of semi-manual saving. My suggestion would work if you want to get, for example, all the comic strips of some webcomic. Come to think of it, I think I'll do that and maybe post something in scripts and scraps when I get something done.

-juk

Link to comment
Share on other sites

Hmm the firefox one doesn't seem to work that well for me. I compiled the script, opened up firefox and surfed to a couple image sites and tried it and nothing happened.

Though now I've mapped ctrl+S to one of my mouse's many keys. :whistle:

"I thought what I'd do is I'd pretend I was one of those deaf-mutes" ~ Laughing Man ~ GITS : SAC

Link to comment
Share on other sites

Hmm the firefox one doesn't seem to work that well for me. I compiled the script, opened up firefox and surfed to a couple image sites and tried it and nothing happened.

Though now I've mapped ctrl+S to one of my mouse's many keys. :)

<{POST_SNAPBACK}>

I don't have firefox here at work, but when I tried it at home, I think the Send("s") put the image as wallpaper, so I needed to change that to Send("v") to save. Can't remember which version of FF I have but english version nevertheless.

-juk

Link to comment
Share on other sites

Hmm tried changing it and still didn't work. Whenever I press alt+s one of the toolbars at the top get highlighted. So I changed what it was set to. And it still highlights something at the top. :whistle:

And found out that my ctrl+s thing won't work for saving images..it'll only save the webpage...Bleh..

"I thought what I'd do is I'd pretend I was one of those deaf-mutes" ~ Laughing Man ~ GITS : SAC

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...