Jump to content


Photo

SavePictureAs - (Save Image/Picture)


  • Please log in to reply
39 replies to this topic

#1 DataLife

DataLife
  • Members
  • 730 posts

Posted 02 February 2011 - 10:42 PM

SavePictureAs Version 8.8

I created this program to easily save pictures from the web with Windows XP, Vista, Windows 7 and Windows 8 using Internet Explorer, Firefox, Chrome, Opera, Safari, Maxthon, RockMelt, Avant, Comodo Dragon, and K-Meleon browsers . Only tested on the English locale.

Windows 8 was in Desktop mode when testing SavePictureAs.

Placing the mouse cursor over any picture on the webpage and pressing Control & Space or user defined keys will save the picture to your hard drive.
 
Tested with AutoHotkey_L 1.1.09.04 Ansi 32bit and AutoHotkey Basic 1.0.48.05 on WinXp, Vista, Windows 7 and Windows 8
 
1. SavePictureAs.exe  http://dl.dropbox.co...vePictureAs.exe  - (right click - save target as)

2. SavePictureAs.zip   http://dl.dropbox.co...vePictureAs.zip - (right click - save target as)

3. SavePictureAs.ahk  http://dl.dropbox.co...vePictureAs.ahk - (right click - save target as)

Some Features are:
(1). History Menu - View, Delete, Move, Copy & Rename last 30 pictures saved.
(2). Hover mouse over tray icon to see the current folder you have selected to download pictures to.
(3). Favorites toolbar - ten configurable buttons for favorite folders to save pictures to. When you want to save a picture from the web, you can click one time on the Favorites toolbar to change the location the picture will be saved to. Then place the mouse over the picture and press Control & Space or user defined keys.
(4). Change screens and text colors.
(5). Saved picture successfully configurable Confirmation Message.
(6). Left or right click the system tray icon brings up the same menu.
(7). Option to prompt user to give the saved picture a filename of their choice.
(8). Auto Update (Check and download latest version)
(9). Displays gui showing original and duplicate pictures with options to rename or delete one or both pictures.
(10). Options to automatically rename original picture.
All features are configurable from the system tray icon.
Please read the comments at the beginning of the script for more information or Program Documentation available via the tray icon.
 
Thanks to the following people from the Autohotkey forum for the following code.
(1) Lexikos - Scrollable Gui code from http://www.autohotke...pic.php?t=28496
(2) tic - Gdip functions to get image dimensions from http://www.autohotke...ic/#entry187736
(3) Sean - Get right click menu contents function GetMenu(hMenu) code from http://www.autohotke...pic.php?t=21451
(4) Sean - Retrieve AddressBar of Firefox through DDE Message code from http://www.autohotke...ugh-dde-message
(5) Eddy & olfen - UrlDownloadToVar from http://www.autohotke...dtovar&start=75
(6) majkinetor - Common dialog for changing Gui & font colors from http://www.autohotke...pic.php?t=17230
(7) majkinetor - Attach.ahk from http://www.autohotke...pic.php?t=48298
(8) Huba - Left click on system tray icon from http://www.autohotke...pic.php?t=26720
(9) jaco0646 - User-defined Dynamic Hotkeys from http://www.autohotke...ynamic-hotkeys/  -AND-   http://www.autohotke...-by-derraphael/
(11) heresy - run ahk scripts with less memory from http://www.autohotke...s-memory-usage/
(12) Chris Mallett for AutoHotkey and Lexikos for continuing to develop AutoHotkey_L
(13) Sorry if I missed someone. If so, let me know and I will give credit where credit is due.
 
Please note: For SavePictureAs to work properly, the script needs to be able to right click, send the letter s or the letter v (depending on browser), then wait for the Save Image, Save Picture or Save As window (depending on browser) to open, it will then send the TempFolder\filename to the edit box, then click on the button labeled &Save.
If you get the error that the picture can not be saved, check that the above can be done manually.
Let me know of any issues.
thanks
DataLife
 
ChangeLog Versions 5.2 thru 7.0 http://dl.dropbox.co...s_ChangeLog.txt
 
ChangeLog Versions 8.0 and newer are below.
 
Edit: 02-26-13 Uploaded Verison 8.0 -Major Update
1)  Added support for Maxthon, Safari and RockMelt
2)  How To Handle Duplicates
A-) Ask What To Do when duplicates are found displays both pictures with the following 4 options (Default)
a-) Rename one or both
b-) Delete one or both
c-) Add Date & Time to one or both
d-) Keep original filename for one picture and apply one of the above options for the other picture
B-) Do not save duplicates with option to be notified when this happens
C-) Always overwrite with option to be notified when this happens
D-) Save duplicates by adding a Random Number to the filename with option to be notified when this happens
E-) Save duplicates by adding the Date & Time with option to be notified when this happens
3)  Filenaming Convention (automatically name saved picture to one of the following)
A-) Date and Time (choose from 6 options on format of Date And Time)
B-) Filename-Date and time
C-) Sequencial Number
D-) Random Number
E-) Filename-Random Number
F-) Original Filename (Default)
G-) Option to add a prefix or suffix to any of the above
4)  Start with windows option (Default off - Does not start with windows)
5)  Place Confirmation Message at mouse position option (Default off)
6)  Clear History on exit option (Default off)
7)  Turn off recording of Last Saved Picture (Default- Recording is on.)
8)  Delete record of the Last Saved Picture on exit and Delete now options (Default off - do not delete on exit)
9)  The user can now define how many pictures to list in the History Menu (Default 30)
10) Added Wait for Save Picture window timeout option to improve reliability on slower computers. (Default 5 seconds)
11) Added View Log File, Clear Log File and Email Log File to Additional Settings Menu (Default - Logging turned off)
12) Added More Info for each of the above options on the Additional Settings Menu with detailed information on each
13) Increase the number of Favorite Folder and Hotkeys from 5 to 10.
14) Added Special Folder on the Configure Hotkeys & Folders menu (Click HERE on Configure Hotkeys & Folders screen for more information)
15) Fixed an issue with the Win Key not being saved as a modifier for hotkeys
 
Edit: 02-28-13 Uploaded Verison 8.1 -Minor Update
1)  Found issue with saving pictures using the Opera browser
 
Edit: 03-21-13 Uploaded Verison 8.2 -Minor Update
1)  Found an issue with saving changes when enabling/disabling the History.

Edit: 04-07-13 Uploaded Version 8.3 -Minor Update
1) Added support for the Avant, Comodo Dragon, and K-Meleon browsers.
2) Added support for Environment and Autohotkey built-in variables. (Click "HERE" on "Configure Hotkeys & Folders" screen for more information)
3) Added ability to turn Favorite Folders 1-10 into "Special Folders" (Click "HERE" on "Configure Hotkeys & Folders" screen for more information)
4) SavePictureAs hotkeys are now only active if one of the supported browsers is active.
5) Added "Change Tray Icon". User can choose from 10 built in icons or add their own icons to choose from.
6) Added icons to the menu items on the system tray icon

Edit: 04-09-13 Uploaded Version 8.4 -Minor Update
1) Fixed an issue with displaying SpaImage.jpg properly on the history menu after "Clear History" was chosen

Edit: 04-12-13 Uploaded Version 8.5 -Minor Update
1) Fixed an issue with Custom Picture Naming Options

 

Edit: 04-16-13 Uploaded Version 8.6 -Minor Update

1) Fixed an issue with Google chrome saving pictures

 

Edit: 04-18-13 Uploaded  Version 8.7 -Minor Update
1) Fixed an issue with reading users saved settings for Favorite Folders being used as Special Folders

Edit: 04-26-13 Uploaded Version 8.8 -Minor Update

1) Fixed an issue with reading users saved settings for CustomFileNaming incorrectly



#2 sumon

sumon
  • Moderators
  • 1307 posts

Posted 03 February 2011 - 12:18 AM

Doesn't work for me, I get an error message that the image doesn't seem to be savable. It appears like it goes right-click, but then can't do something.

Windows 7, Google Chrome, swedish.

#3 DataLife

DataLife
  • Members
  • 730 posts

Posted 03 February 2011 - 02:52 AM

Doesn't work for me, I get an error message that the image doesn't seem to be savable. It appears like it goes right-click, but then can't do something.

Windows 7, Google Chrome, swedish.


The script should send right click, then send v to open the Save As window in Chrome.

Does your right click menu have "Save image as' ?

If you manually right click on an image and press the letter v does it bring up the Save As window?

I have no idea if using swedish has anything to do with it.

DataLife

#4 sumon

sumon
  • Moderators
  • 1307 posts

Posted 03 February 2011 - 01:29 PM

Yup, the problem is the language. I'll see if I can manually adjust it because the script seems awesome :)

In Google Chrome, the menu doesn't have any hotkeys (how odd), I also checked in Firefox, and there the right-click menu does have hotkeys, but in swedish. Save image as ---> Spara bild som. Pressing V would bring up the "Show image" (Visa bild) instead. :D

#5 DataLife

DataLife
  • Members
  • 730 posts

Posted 03 February 2011 - 02:00 PM

Yup, the problem is the language. I'll see if I can manually adjust it because the script seems awesome :)

In Google Chrome, the menu doesn't have any hotkeys (how odd), I also checked in Firefox, and there the right-click menu does have hotkeys, but in swedish. Save image as ---> Spara bild som. Pressing V would bring up the "Show image" (Visa bild) instead. :D


You could change send v to send arrow keys and send enter.
After the script puts the new filename in the combo box the scripts sends the following line.
ControlClick , &Save, Save %PictureImage%,,,,NA

You may have to change it to click on the save button another way.

The script also verifies certain windows are open, before it continues. In most cases it uses the window class. I hope the window class is the same across multiple languages. It looks for either Save Picture for IE, Save Image for Chrome and Firefox, and Save As for Opera.

Until I get time to look over the script, it may be necessary to verify the window Class for Chrome and verify if your window title shows Save Image.



DataLife

#6 DataLife

DataLife
  • Members
  • 730 posts

Posted 03 February 2011 - 07:56 PM

sumon

I uploaded version 5.2

I found a couple of msgboxes I was using for troubleshooting.

DataLife

#7 DataLife

DataLife
  • Members
  • 730 posts

Posted 05 October 2011 - 03:52 AM

Uploaded Version 6.2 - Fixed issue with Google Chrome not saving images in certains conditions.

Download lastest version from the first post of this thread.

DataLife

#8 DataLife

DataLife
  • Members
  • 730 posts

Posted 09 October 2011 - 02:23 AM

Uploaded Version 6.3 - Fixed issue with Windows 7 and Firefox not being able to verify the image was successfully saved

Download the latest version from the 1st post of this thread.

DataLife

#9 randomguy

randomguy
  • Members
  • 86 posts

Posted 17 November 2011 - 02:23 PM

nice script, I don't know why the Zip file works, but the ahk version does not. It says Include file RecycleBin.Ahk can not be opened

#10 randomguy

randomguy
  • Members
  • 86 posts

Posted 17 November 2011 - 02:25 PM

I'm trying to modify the script to work as this: If I click and drag the picture in Chrome/Firefox to the right, it automatically saves to a folder, if to the left it saves to another folder, and if Up it displays the save As dialog box. I don't know how yet, can anyone help me?

Too lazy reaching for the keyboard for a Ctrl + Space nowadays :))

#11 DataLife

DataLife
  • Members
  • 730 posts

Posted 17 November 2011 - 11:35 PM

I am working on version 6.4 which includes checking for duplicates in folders, subfolders and also the recycle bin (all configurable) before saving the image.

I have no clue how I uploaded 6.4 instead of 6.3.

Download it again and you won't get that error message.

I will look at the "click and drag" you are asking about when I get home tonight.

#12 randomguy

randomguy
  • Members
  • 86 posts

Posted 18 November 2011 - 01:13 AM

great, thanks! :D

#13 DataLife

DataLife
  • Members
  • 730 posts

Posted 18 November 2011 - 02:39 AM

I put together a little script to click and drag to save images.
Assign a folder to LeftFolder and RightFolder at the top of the script.
Click and drag left, right or up at least 20 pixels on an image.

You may have to work out some issues, like timimg (adjust sleeps) or what you want to do if the mouse is dragged more then 20 pixels in two directions. As in 20 to the left and 20 up. This script will try to do both.

Make sure when you release the mouse button your cursor is still over the image.

Only tested in Google Chrome.

SetTitleMatchMode,1
LeftFolder = %a_desktop%\temp
RightFolder = %A_MyDocuments%\temp
return
~lbutton::
MouseGetPos,xd,yd
return

~lbutton up::
MouseGetPos,xu,yu
if (xd-xu) > 20
 {
  gosub,OpenSaveWindow
  ControlSetText,Edit1,%LeftFolder%\%FileName%,Save
  ControlClick , &Save, Save,,,,NA 
  Sleep 2000
 }
if (xu-xd) > 20
 {
  gosub,OpenSaveWindow
  ControlSetText,Edit1,%RightFolder%\%FileName%,Save
  ControlClick , &Save, Save,,,,NA
 }
if (yd-yu) > 20
 {
  sleep 500
  Send {rbutton} 
  Sleep, 500
  send {v}
  WinWaitActive, Save,,5
  if errorlevel = 1
   {
	MsgBox Timed Out waiting for Save As window
	return
   }
 }
return

OpenSaveWindow:
  sleep 500
  Send {rbutton} 
  Sleep, 500
  send {v}
  WinWaitActive, Save,,5
  if errorlevel = 1
   {
	MsgBox Timed Out waiting for Save As window
	return
   }
  ControlgetText, Filename, Edit1, Save 
  ControlSetText, Edit1,,Save
return



#14 randomguy

randomguy
  • Members
  • 86 posts

Posted 18 November 2011 - 07:42 AM

I frequently receive "Time out waiting for save as window", what is that?

Because the image has been succesfully saved

#15 randomguy

randomguy
  • Members
  • 86 posts

Posted 18 November 2011 - 07:59 AM

Somehow it does the rightclicking and save as for me, but it always saves in Chrome's Default saveto folder