Screen clipping
- Joe Glines
- Posts: 770
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Screen clipping
Look under applications then select the Client ID
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
-
- Posts: 13
- Joined: 07 Dec 2015, 12:31
Re: Screen clipping
Allright, thanks I got it. But it is not working. https://youtu.be/FawNbKpdDBU
- Joe Glines
- Posts: 770
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Screen clipping
troubleshooting remotely is pretty tough... Here are a few quick take-aways
1) the IMUGR part didn't work because there was no file to upload
2) although you said "nothing" which doing some of the hotkeys, you do see the rectangle being made when you drag which is a good sign that somethiig is working
3) I'd put some message boxes in there to see if an object is getting created (or at least to confirm where you get to in the script)
4) the way the script works you should see a capture immediately after holding down the windows key and dragging. (thus your opening paint/editor and pasting will not work) It boils down to an error why the file/image isn't getting created in the first place
1) the IMUGR part didn't work because there was no file to upload
2) although you said "nothing" which doing some of the hotkeys, you do see the rectangle being made when you drag which is a good sign that somethiig is working
3) I'd put some message boxes in there to see if an object is getting created (or at least to confirm where you get to in the script)
4) the way the script works you should see a capture immediately after holding down the windows key and dragging. (thus your opening paint/editor and pasting will not work) It boils down to an error why the file/image isn't getting created in the first place
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
-
- Posts: 204
- Joined: 24 Jun 2015, 23:38
Re: Screen clipping
This is a really great script... thank you for posting
I had a few troubles getting it to work but that was due to my setup and here is what I had to update...
I have been itching to have this running ever since I saw the YouTube video (which was also great btw--if it weren't for that I would have ignored the code because it didn't run for me out of the box).
Something I am currently working on (which is partially working) is to slave this to the OneNote screen capture utility. There is a key difference between the OneNote utility and this tool, which is the order of capture. The OneNote utility will capture the whole screen and then make it available to crop. This means you can grab things instantaneously that popup and disappear, including windows that might disappear if they lose focus, or things like that. With this screen clipper utility, it will only capture after you're done drawing the box, and ongoing activity will continue to update the screen underneath it. BUT, this one will keep the graphics on the screen and can be customized to save, attach to an email, etc. So I'm hoping to get the best of both worlds eventually.
Nice work... this is really great
I had a few troubles getting it to work but that was due to my setup and here is what I had to update...
- First update I had to make before anything would work was using the latest GDIP routines... I'm wondering if that was an x64 compatibility issue.
- After that I had a secondary issue, because in SCW_SelectAreaMod() there is a while loop that waits for the mouse button to no longer be pressed, i.e., user is done drawing the box... While, (GetKeyState(Hotkey, "p")). It turns out that I had an old copy of polyethylene's functions.ahk #included which had a duplicate/deprecated GetKeyState() function... getting that nuked finally got it running.
I have been itching to have this running ever since I saw the YouTube video (which was also great btw--if it weren't for that I would have ignored the code because it didn't run for me out of the box).
Something I am currently working on (which is partially working) is to slave this to the OneNote screen capture utility. There is a key difference between the OneNote utility and this tool, which is the order of capture. The OneNote utility will capture the whole screen and then make it available to crop. This means you can grab things instantaneously that popup and disappear, including windows that might disappear if they lose focus, or things like that. With this screen clipper utility, it will only capture after you're done drawing the box, and ongoing activity will continue to update the screen underneath it. BUT, this one will keep the graphics on the screen and can be customized to save, attach to an email, etc. So I'm hoping to get the best of both worlds eventually.
Nice work... this is really great
-
- Posts: 204
- Joined: 24 Jun 2015, 23:38
Re: Screen clipping
Another thing I forgot about that was not working... the part that copies the screen to the clipboard without the border:
Two things about this:
Code: Select all
SCW_Win2Clipboard(KeepBorders=0) {
Send, !{PrintScreen} ; Active Win's client area to Clipboard
if !KeepBorders
{
pToken := Gdip_Startup()
pBitmap := Gdip_CreateBitmapFromClipboard()
Gdip_GetDimensions(pBitmap, w, h)
pBitmap2 := SCW_CropImage(pBitmap, 3, 3, w-6, h-6)
Gdip_SetBitmapToClipboard(pBitmap2)
Gdip_DisposeImage(pBitmap), Gdip_DisposeImage(pBitmap2)
Gdip_Shutdown("pToken")
}
}
- First, possibly because I am using a different version of GDIP and/or x64 issues, it just doesn't work for me... not sure how to go about tackling that one yet
- Second, I'm pretty sure "pToken" should be passed as an argument, not in quotes, i.e., Gdip_Shutdown("pToken") should be Gdip_Shutdown(pToken)... that looks like a typo in the original code as far as I can tell that would mostly go unnoticed unless you're looking at the memory profile, where various pToken objects are accumulating over time and not actually being released
Help to make it work
Hi, this is a really great script, but I didn't get it to work!
01. When I press "Win + Left Button" and drag I see the rectangle being made, but when I release the "Left Button" nothing happens!
I am running the latest version of AHK, with Windows10 x64.
Please, help me.
01. When I press "Win + Left Button" and drag I see the rectangle being made, but when I release the "Left Button" nothing happens!
I am running the latest version of AHK, with Windows10 x64.
Please, help me.
- Joe Glines
- Posts: 770
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Screen clipping
Can you confirm the script is actually running? Also you might throw in a messagebox right after the call to the hotkey to see if your hotkey is actually triggering anything
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Screen clipping
Yes, the script is running. I checked with a messagebox.
Btw, I've got it to work with the "Gdip All" (for other versions of AHK: 32, 64, unicode, ansi)
#Include %A_ScriptDir%\Gdip_All.ahk
This way the script seems to work properly.
Btw, I've got it to work with the "Gdip All" (for other versions of AHK: 32, 64, unicode, ansi)
#Include %A_ScriptDir%\Gdip_All.ahk
This way the script seems to work properly.
- Joe Glines
- Posts: 770
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Screen clipping
There should be no need to include it because I went through and extracted everything needed and included it in my file. Having said that, I wonder why it works when you do that. Can you send me the script you're running so I can review? [email protected]
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Screen clipping
I've just send it
- Joe Glines
- Posts: 770
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Screen clipping
Just in case y'all have had the same issue as rickss, we figured out the issue. He's normally running the 64-bit version of AutoHotkey and thus caused the issue. I've updated the original code to detect what version it is running under and revert to 32 bit if it is launched in 64 bit code. (maestrith helped with that one)
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Screen clipping
This is awesome, thanks you for sharing man
Re: Screen clipping
Mr. Glines - I have been using this script now for awhile and I absolutely love it! I use it on my desktop all the time and even put it on my laptop.
So useful! I use win+drag to create the screen-snip and use it as reference.
Thank you so much for this!
Someone is copycatting your idea, though!
Look: http://www.snapfiles.com/get/snipaste.html
So useful! I use win+drag to create the screen-snip and use it as reference.
Thank you so much for this!
Someone is copycatting your idea, though!
Look: http://www.snapfiles.com/get/snipaste.html
My Stuff: mousey; volume; ahkinfo; instantbirder; npp highlighter; Dynamic File Menu; tv - a treeview library;
- Joe Glines
- Posts: 770
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Screen clipping
DeepMind & BGM- I'm glad y'all find it helpful! I sure do as it is one of the scripts I use most often.
yes, there are a lot of "snipping" tools out there. I used the original one of this for quite awhile but added in the extra functionality which, for me, is what really makes it useful.
yes, there are a lot of "snipping" tools out there. I used the original one of this for quite awhile but added in the extra functionality which, for me, is what really makes it useful.
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Screen clipping
Hey Joe,
For what it's worth, I'm on Windows 10, 64bit, and the snipping did not work out of the box...
I noticed you had Gdip v1.38 in your script...
I replaced it with Gdip v1.45 and now things are working as I see in your youtube videos...
Thanks for all your effort! This is definitely cool stuff!!!
For what it's worth, I'm on Windows 10, 64bit, and the snipping did not work out of the box...
I noticed you had Gdip v1.38 in your script...
I replaced it with Gdip v1.45 and now things are working as I see in your youtube videos...
Thanks for all your effort! This is definitely cool stuff!!!
- Joe Glines
- Posts: 770
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Screen clipping
Yeah- I use 32-bit of AutoHotkey. I added the below code which will relaunch the script if the current version is 64 bit but hadn't updated the original code yet.
Code: Select all
if((A_PtrSize=8&&A_IsCompiled="")||!A_IsUnicode){ ;32 bit=4 ;64 bit=8
SplitPath,A_AhkPath,,dir
if(!FileExist(correct:=dir "\AutoHotkeyU32.exe")){
MsgBox error
ExitApp
}
Run,"%correct%" "%A_ScriptName%",%A_ScriptDir%
ExitApp
return
}
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Screen clipping
Hi. I love this script. However, I have to use a 125% zoom to text, apps, etc in Windows 10. It is the only way I can read the screen without killing my eyes. Because of this, the end of the rectangle is off with my mouse. I know I need a scaling factor but I don't know enough to know where to put it. Any suggestions?
H
H
Re: Screen clipping
Try to finde Gui %g%: +AlwaysOnTop -caption +Border +ToolWindow +LastFound and convert to Gui %g%: +AlwaysOnTop -caption +Border +ToolWindow +LastFound -DPIScale
Re: Screen clipping
Unlike other people here, I am having trouble getting it running it to do what it claims, on my system(64-bit Windows 10).
Lwin+Lbutton+drag mouse brings up the yellow highlighted box alright.
However, nothing happens after that(releasing the mouse button should result in a final capture).
No screen capture, therefore no floating window.
The other hotkeys(i.e. e-mail & URL extensions) produce runtime errors staring at line 2508: imag.LoadFile(File_to_Upload).
I tested it in two different ways:
(1) Incorporating it into my existing script via "#Include %A_ScriptDir%\screenclip.ahk" where screenclip.ahk is the screen clipping script(full update version),
(2) Compiling and independently running it(without other AHK scipts running together).
Both non-compiled/compiled versions show similar symptoms, and both fail to work.
Suspecting version imcompatibility, I also tried setting the compatiblity mode to Windows 7 , but to no avail.
Help would be appreciated.
Lwin+Lbutton+drag mouse brings up the yellow highlighted box alright.
However, nothing happens after that(releasing the mouse button should result in a final capture).
No screen capture, therefore no floating window.
The other hotkeys(i.e. e-mail & URL extensions) produce runtime errors staring at line 2508: imag.LoadFile(File_to_Upload).
I tested it in two different ways:
(1) Incorporating it into my existing script via "#Include %A_ScriptDir%\screenclip.ahk" where screenclip.ahk is the screen clipping script(full update version),
(2) Compiling and independently running it(without other AHK scipts running together).
Both non-compiled/compiled versions show similar symptoms, and both fail to work.
Suspecting version imcompatibility, I also tried setting the compatiblity mode to Windows 7 , but to no avail.
Help would be appreciated.
- Joe Glines
- Posts: 770
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Screen clipping
Sorry I didn't see your post. The original post didn't work for 64 bit. I've updated it to detect if you're running 64 bit. If you are, it will switch to 32 bit version of AutoHotkey. that's what the following code is doing:
Code: Select all
if((A_PtrSize=8&&A_IsCompiled="")||!A_IsUnicode){ ;32 bit=4 ;64 bit=8
SplitPath,A_AhkPath,,dir
if(!FileExist(correct:=dir "\AutoHotkeyU32.exe")){
MsgBox error
ExitApp
}
Run,"%correct%" "%A_ScriptName%",%A_ScriptDir%
ExitApp
return
}
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 131 guests