[Solved] Can I script this? Copy selection then save

The right place to speak and share about your experiences of GraphicConverter
Post Reply
mbaker00
Posts: 2
Joined: Tue May 16, 2017 9:31 pm

[Solved] Can I script this? Copy selection then save

Post by mbaker00 »

I'm working through a very tedious task of opening over 400 images of scanned book pages. On each page is typically 2 or 3 graphics I need to copy and paste to a new file. The position and size of the selection would vary. Currently I open the image, select the area, Cmd-c, Cmd-j, Cmd-s, Cmd-s, Cmd-w. I would love to have a scripted solution that as soon as I make the selection and adjust it, then cmd-c copy, the script would take over and finish. Or after I've made the selection, I could trigger a script to finish. Each file just gets saved as untitled to a folder. There is a folder action script that is working to rename any file placed there to a file name with date and time. I have not worked significantly in Applescript for many years and my trials recently are not working for this solution. I don't know if this is possible to completely automate beyond the necessary step of making a selection in the image.
Any thoughts would be appreciated.
Thanks,
Michael
User avatar
forum_adm
Site Admin
Posts: 1814
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Can I script this? Copy selection then save

Post by forum_adm »

I added now this special feature.

Just download the latest BETA at:
http://www.lemkesoft.org/beta.html

and view my short tutorial movie:
http://www.lemkesoft.org/help/part_saving.mp4

Thorsten
mbaker00
Posts: 2
Joined: Tue May 16, 2017 9:31 pm

Re: [Solved] Can I script this? Copy selection then save

Post by mbaker00 »

Thorsten,
Wow, that was fast and impressive. I think this could work for the problem I have. I would like to ask about the possibility of additional options.

Since the file is saved as soon as the selection is dropped, there is no option to adjust the selection box before the file is saved. Would it be as easy to add this save option to a clipboard setting, so as soon as the selection is adjusted and the user does a Copy of cmd-c then the clipboard would be saved in the same way? Even as is, I may use this solution and just select larger areas rather than risk losing part of the area of interest.

Second, in addition to PNG, would it be easy to add additional file types like TIFF or JPG or save as same file type?

Again, thanks for the incredibly fast feature addition.

Michael

UPDATE: I've been testing this since yesterday and it is working very well for my problem. I've turned on the grid view to help me more accurately choose the selection begin and end corners. Rarely I have a bad selection and have to go to the save folder to delete the selection and start again. This is saving my a lot of time. I've now purchased my upgrade from version 8 to 10 so that I'll have this feature in the next release update. It would still be nice to be able to choose TIFF as a file save format.
Thank you so much for adding this feature.
Michael :)
User avatar
forum_adm
Site Admin
Posts: 1814
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: [Solved] Can I script this? Copy selection then save

Post by forum_adm »

I added now a "Store as PNG to predefined Folder" menu item to the copy menu.
So, you can define the folder.
Add a shortcut for the menu item with the system settings and store the selection manually.

http://www.lemkesoft.org/beta.html

I use PNG as format because it supports various color depths and the alpha channel.
Just batch convert all PNGs after your work in one quick conversion if you need another file format.
Post Reply