Screen clipping

Post your working scripts, libraries and tools
User avatar
Learning one
Posts: 119
Joined: 04 Oct 2013, 13:59
Location: Croatia
Contact:

Screen clipping

20 Dec 2015, 19:14

Continued from old Screen clipping thread.
User avatar
Joe Glines
Posts: 421
Joined: 30 Sep 2013, 20:49
Facebook: https://www.facebook.com/theAutomatorGuru/
Google: https://plus.google.com/105328929654286634910
GitHub: joetazz
Location: Dallas
Contact:

Re: Screen clipping

30 Dec 2015, 17:58

A few years ago I made tweaks to your (and other's) screen clipping script. Just thought I'd post it here as I use this functionality at least a dozen times a day and I think more people should consider it as an always-running script.

The gist of the tweaks I made are:
1) Windows+Control and left-mouse-click (drawing a rectangle) will do normal clipping and leave clipboard empty

2) Windows+Alt and left-mouse-click (drawing a rectangle) saves the image as jpg and bmp in the folder where script is running, then creates an email in Outlook adding in info about the picture (time it was taken, etc) and copies the path to the jpg to the clipboard (this is convenient if posting to Facebook)

3) Windows+left-mouse-click(drawing a rectangle) will do normal clipping but copies it to the clipboard as well.

For those that do not use screen-clipping regularly, I've made a short video demonstrating how I use it. Trust me- Once you start using it, you'll wonder how you worked without it. :superhappy:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Last edited by Joe Glines on 23 Oct 2016, 20:27, edited 5 times in total.
scriptor2016
Posts: 245
Joined: 21 Dec 2015, 02:34

Re: Screen clipping

01 Jan 2016, 22:42

man.. this is really cool.. totally brilliant. great job on this :)

Let's say I took 5 clips. How do I delete one of them?
User avatar
BGM
Posts: 346
Joined: 20 Nov 2013, 20:56
GitHub: bgmCoder
Contact:

Re: Screen clipping

02 Jan 2016, 11:12

This is a neat script. It is rare that you see anything truly original these days in the realm of screeshot-taking.

If you:
SCW_SetUp("DrawCloseButton.on")
then
SCW_Win2Clipboard(0)
will still capture the borders (it's not supposed to).

Also, I use Thunderbird, not Outlook, so the email option is of no value to me.
Therefore, I recommend that the save-as-image-file functionality be moved to it's own parameter or it's own function (it's part of email right now, I think).
And in that regard, maybe the parameter could be like this:
save=0 --> no images saved
save=1 --> save to bmp
save=2 --> save to jpg
save=3 --> save to png
usage:
SCW_ScreenClip2Win(clip:=1,email:=1,save:=23)
and so it would save the image as both jpg and png

I also recommend an option to allow for a custom save path, and allowing to autoname the files according to a timestamp so they don't overwrite each other.

Thanks for sharing!
User avatar
Joe Glines
Posts: 421
Joined: 30 Sep 2013, 20:49
Facebook: https://www.facebook.com/theAutomatorGuru/
Google: https://plus.google.com/105328929654286634910
GitHub: joetazz
Location: Dallas
Contact:

Re: Screen clipping

03 Jan 2016, 16:33

Thanks BGM! :dance: I didn't see your reply before I made the below updates. I now added an IMUGR upload option (anyone using this will have to get their own account and add the client value to the following line (replacing XXXXX with their value)

Code: [Select all] [Download] GeSHi © Codebox Plus

global IMUGR_client:="XXXXX"

Here is the full updated version (I also added some a help menu which you can acces from double-clicking the Icon or from right click and selecting help.

Here's an updated video demonstrating it's usage.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Last edited by Joe Glines on 15 Jul 2016, 12:12, edited 3 times in total.
User avatar
Joe Glines
Posts: 421
Joined: 30 Sep 2013, 20:49
Facebook: https://www.facebook.com/theAutomatorGuru/
Google: https://plus.google.com/105328929654286634910
GitHub: joetazz
Location: Dallas
Contact:

Re: Screen clipping

03 Jan 2016, 16:37

@scriptor2016 My script is purposely writen to be working(saving) one image. This is also why I hard-coded the name of the file as I wanted simple and fast w/no options. If memory servers I remember seeing other versions which would automatically name them and save them to a folder.

Personally, when I'm working with multiple captures, I just use the Windows+Click option and create multiple clips that stay on top of the screen. If/when I choose to actually save one, I then paste it into a program and save it from there (or paste into Word / Email, etc). BTW- I was amazed that I could even paste it into a gmail from a web browser. :)
japankid3000
Posts: 43
Joined: 14 Nov 2015, 09:58

Re: Screen clipping

15 Jan 2016, 09:13

It is good to know if i ever need a snipping tool i can come here to get it.

Why do you use this though instead of snipping tool that comes with windows?
User avatar
Joe Glines
Posts: 421
Joined: 30 Sep 2013, 20:49
Facebook: https://www.facebook.com/theAutomatorGuru/
Google: https://plus.google.com/105328929654286634910
GitHub: joetazz
Location: Dallas
Contact:

Re: Screen clipping

15 Jan 2016, 09:37

Did you watch the video I made? For me, tying it in with the other options (emailing it, saving to local file, upload to IMUGR, etc. made it incredibly helpful
japankid3000
Posts: 43
Joined: 14 Nov 2015, 09:58

Re: Screen clipping

15 Jan 2016, 12:21

Had no idea right after my post i would need a new snipping tool!!!

Snipping tool with windows won't snip my image if the image i am trying to snip is too small.

I need to snip tiny little images so i want to use this but when i try to run it i get this.

Image
japankid3000
Posts: 43
Joined: 14 Nov 2015, 09:58

Re: Screen clipping

15 Jan 2016, 13:28

I was running an old version and updated and now your script works.

I have no use for outlook feature, i just want to be able to snip and save it, but when i hold either WindowsKey + Left Click and drag or WindowsKey + Ctrl + Left Click and drag it does not indicate it took a screen clipping or did anything and i do not know where the image is saved?

Windows 7 64bit if that matters.
User avatar
Joe Glines
Posts: 421
Joined: 30 Sep 2013, 20:49
Facebook: https://www.facebook.com/theAutomatorGuru/
Google: https://plus.google.com/105328929654286634910
GitHub: joetazz
Location: Dallas
Contact:

Re: Screen clipping

15 Jan 2016, 13:37

I hard-coded where it saves it to the folder where the script is running. I also had a version which would copy the path of the file created to the clipboard. THat would be easy to update...
japankid3000
Posts: 43
Joined: 14 Nov 2015, 09:58

Re: Screen clipping

15 Jan 2016, 20:06

When i run it, it doesn't show the little ahk icon in my taskbar like with all other scripts i have, so where is the script running . Is it maybe somewhere in c:/ program files ?
LarryC
Posts: 12
Joined: 30 Sep 2013, 12:14

Re: Screen clipping

17 Jan 2016, 14:32

Wonderfull script.
On my computer, the selection would spring to a smaller selection. So, after lines (about line 216),

Code: [Select all] [Download] GeSHi © Codebox Plus

If ( MY > MYend )
temp := MY, MY := MYend, MYend := temp
,
and before "Return",

I added lines

Code: [Select all] [Download] GeSHi © Codebox Plus

   w:=w*1.51
h:=h*1.5
.

Seems strange, but works.
tervon

Re: Screen clipping

17 Jan 2016, 16:58

This script is a real gem, excellent work Joe_Glines_Joetazz!

It works (so far, haven't tried it a lot yet) also with the latest 1.45 version of gdip.

In the #IfWinActive, ScreenClippingWindow ahk_class AutoHotkeyGUI section I added

for two more ways to quickly close a selected clipping without clicking precisely in the upper right corner.

Two feature requests:
- We can drag a clipping so that part of it is outside of the right, left or bottom edge of the screen. But that doesn't work on the top of the screen. Drag out part of the clipping on top and it will "bounce back". Could you add an option to have the top behave like the other sides?

- It could be useful to have a hotkey to toggle all current clippings visible/hidden if we temporarily need to see the full underlying window.
tervon

Re: Screen clipping

17 Jan 2016, 17:26

One more small modification I did: a ctrl+S hotkey to save the selected clipping as a timestamp named .png on the desktop.

In the #IfWinActive, ScreenClippingWindow ahk_class AutoHotkeyGUI section I added

Code: [Select all] [Download] GeSHi © Codebox Plus

^s:: SCW_Win2File(0)  ;save selected clipping on desktop as timestamp named .png

and after the whole SCW_Win2Clipboard(KeepBorders=0) function I added this modified version of the same function

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
Joe Glines
Posts: 421
Joined: 30 Sep 2013, 20:49
Facebook: https://www.facebook.com/theAutomatorGuru/
Google: https://plus.google.com/105328929654286634910
GitHub: joetazz
Location: Dallas
Contact:

Re: Screen clipping

17 Jan 2016, 20:00

@LarryC I believe the issue with it springing to a smaller size is if your computer is set to increase the font size (to medium - 125% or Larger-150%). When I set mine back to Smaller-100%(default) I no longer experienced the issue. I think it is probably something we could check the regsitry and see how it is currently set then use your code to adapt if need-be.
User avatar
Joe Glines
Posts: 421
Joined: 30 Sep 2013, 20:49
Facebook: https://www.facebook.com/theAutomatorGuru/
Google: https://plus.google.com/105328929654286634910
GitHub: joetazz
Location: Dallas
Contact:

Re: Screen clipping

17 Jan 2016, 21:10

@tervon - Thanks for those ideas! I added them to mine (not that clicking in upper right is a pain, but definitely nice to have the other options)

I also added the saving option/function you had (although I might monkey with the date_format of the file)
Cool adds! Thanks!
:dance:
TheBrohman
Posts: 13
Joined: 07 Dec 2015, 12:31

Re: Screen clipping

19 Jan 2016, 08:20

I cant seem to find my Client Value. Would it be my username, or?

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 13 guests