Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Screen Capture with Transparent Windows and Mouse Cursor


  • Please log in to reply
245 replies to this topic
noname
  • Members
  • 650 posts
  • Last active:
  • Joined: 12 Nov 2011

You are using Gdip_BitmapFromScreen instead of Gdip_BitmapFromHWND


winXP  and ahk unicode


DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008

You are using Gdip_BitmapFromScreen instead of Gdip_BitmapFromHWND


thank you, that fixed the issue.
Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.

dangerdogL2121
  • Members
  • 636 posts
  • Last active: Nov 19 2015 03:39 AM
  • Joined: 22 Dec 2012

Hey, will this code work?

CaptureScreen("0,0,%A_ScreenWidth%,727", True,A_Desktop "\ScreenPictures\ScreenCapture" count ".jpg")

It isn't working so far.  I want to be able to only get a portion of the screen and save it as what I want.  I will use the convert function if I have to but I first I want to know if there's another way.

Thanks


There is a new AutoHotkey forum here.


toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005
You'll need to split up the first parameter to allow the a_screenwidth variable to expend.
Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.

dangerdogL2121
  • Members
  • 636 posts
  • Last active: Nov 19 2015 03:39 AM
  • Joined: 22 Dec 2012

Why didn't I see that?

Thankswink.png


There is a new AutoHotkey forum here.


dangerdogL2121
  • Members
  • 636 posts
  • Last active: Nov 19 2015 03:39 AM
  • Joined: 22 Dec 2012

Having more trouble

CaptureScreen("0,0,"A_ScreenWidth,"727", True,A_Desktop "\ScreenPictures\ScreenCapture" count ".jpg")

no captures are taken.  How else can the screen width be entered into the function?

thanks


There is a new AutoHotkey forum here.


DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008

Having more trouble

CaptureScreen("0,0,"A_ScreenWidth,"727", True,A_Desktop "\ScreenPictures\ScreenCapture" count ".jpg")
no captures are taken.  How else can the screen width be entered into the function?
thanks

 


this works

CaptureScreen("0,0," A_ScreenWidth ",727", True,A_Desktop "\ScreenPictures\ScreenCapture" count ".jpg")

Look at the 727 to see the difference.

 


Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.

dangerdogL2121
  • Members
  • 636 posts
  • Last active: Nov 19 2015 03:39 AM
  • Joined: 22 Dec 2012

Thanks

I thought I tried that but I guess not.  The reason that the other wasn't working was that since the comma was out of the quotes, it was counted as part of the variable, I guess.


There is a new AutoHotkey forum here.


toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005
Not exactly, the comma separates the parameter of a function call, thus you started the next parameter
Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.

dangerdogL2121
  • Members
  • 636 posts
  • Last active: Nov 19 2015 03:39 AM
  • Joined: 22 Dec 2012

Oh yeah.  So the second parameter was "727.


There is a new AutoHotkey forum here.


DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008

Thanks

I thought I tried that but I guess not.  The reason that the other wasn't working was that since the comma was out of the quotes, it was counted as part of the variable, I guess.

 

Not exactly, the comma separates the parameter of a function call, thus you started the next parameter

Just to add to that.

If the comma is in within the "Quotes" then it is part of the parameter instead of starting a new parameter.
 


Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.

dangerdogL2121
  • Members
  • 636 posts
  • Last active: Nov 19 2015 03:39 AM
  • Joined: 22 Dec 2012

So, "0,0," A_ScreenWidth ",727" is counted as one parameter, rather than them all being parameters?

thanks


There is a new AutoHotkey forum here.


DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008

Is there anyway to modify the code below to capture the cursor with the active window?

 

I know it can be done with Seans screen capture but I need the screen shot to include the entire active window, even if some of the active window is not visible.

  pToken := Gdip_Startup()
  pBitmap := Gdip_BitmapFromHwnd(WinExist("A"))
  Gdip_SaveBitmapToFile(pBitmap, "\tempfolder\CaptureActiveWindow.jpg",100)
  Gdip_DisposeImage(pBitmap)
  Gdip_Shutdown(pToken)

Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.

Guest10
  • Members
  • 1216 posts
  • Last active: Oct 30 2015 05:12 PM
  • Joined: 27 Oct 2012

i should read the whole 16 pages of this thread, but i have a simple question. can this script be used to take a screen shot (capture the screen) of a certain/defined window or a website in the background (using COM?)?



BradleyS
  • Members
  • 220 posts
  • Last active: Mar 05 2016 10:45 PM
  • Joined: 20 Sep 2005

I'd like to download this but the URL is broken. Does anybody have a valid link?