You are using Gdip_BitmapFromScreen instead of Gdip_BitmapFromHWND
Screen Capture with Transparent Windows and Mouse Cursor
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.
Having more troubleCaptureScreen("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?
CaptureScreen("0,0," A_ScreenWidth ",727", True,A_Desktop "\ScreenPictures\ScreenCapture" count ".jpg")
Look at the 727 to see the difference.
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.
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)