Sign in to follow this  
Followers 0
Vegar

PixelChecksum in minimized window

7 posts in this topic

Hello..

is there any way to PixelChecksum in a minimized or non active window?

Share this post


Link to post
Share on other sites



I don't beleive this is possible because pixel checksum checks the pixels currently displayed on the screen. If the window is not shown, the correct pixels won't be returned.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

hmm, is there anything else then i can use?

i want to make a func when a certain pixel change in a certain window witch is most of the time not active or minimized.

Thnx for all help :)

Share this post


Link to post
Share on other sites

I believe there is a way to get a screenshot of a minimzed window...read ti somewhere on the forums, maybe you could use a similar method....


[center][/center][center]=][u][/u][/center][center][/center]

Share this post


Link to post
Share on other sites

I am pretty sure you can't take a screenshot of a minimized window. A screenshot is just that, it takes a picture of what is currently on your screen, not what will be on your screen after you click a window.

http://www.autoitscript.com/forum/index.php?showtopic=76949

http://www.autoitscript.com/forum/index.php?showtopic=10474


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

Hmm ok...

i've found this on the forum ... is it possible to use this in any way? :)

#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <ScreenCapture.au3>

_GDIPlus_Startup()

;$hGUI = GUICreate("Screen Capture", 400, 300, @DesktopWidth, @DesktopHeight)
;GUISetState()


$hGUI = WinGetHandle("AutoIt Help")
WinMove($hGUI, "", @DesktopWidth, @DesktopHeight)



$iWidth = _WinAPI_GetWindowWidth($hGUI)
$iHeight = _WinAPI_GetWindowHeight($hGUI)


$hParent = GUICreate("WindowViewer", 500, 400)
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($hParent)
GUISetState()


While 1

$hBMP = _WinCapture($hGUI, $iWidth, $iHeight)

$hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBMP)

_GDIPlus_GraphicsDrawImageRectRect($hGraphics, $hImage, 0, 0, $iWidth, $iHeight, 50, 50, 400, 300)

_GDIPlus_ImageDispose($hImage)
_WinAPI_DeleteObject($hBMP)

Sleep(1000)

WEnd


Func _WinCapture($hWnd, $iWidth = -1, $iHeight = -1)
Local $iH, $iW, $hDDC, $hCDC, $hBMP

If $iWidth = -1 Then $iWidth = _WinAPI_GetWindowWidth($hWnd)
If $iHeight = -1 Then $iHeight = _WinAPI_GetWindowHeight($hWnd)



$hDDC = _WinAPI_GetDC($hWnd)
$hCDC = _WinAPI_CreateCompatibleDC($hDDC)
$hBMP = _WinAPI_CreateCompatibleBitmap($hDDC, $iWidth, $iHeight)
_WinAPI_SelectObject($hCDC, $hBMP)

DllCall("User32.dll", "int", "PrintWindow", "hwnd", $hWnd, "hwnd", $hCDC, "int", 0)
;_WinAPI_BitBlt($hCDC, 0, 0, $iW, $iH, $hDDC, 0, 0, 0x00330008)


_WinAPI_ReleaseDC($hWnd, $hDDC)
_WinAPI_DeleteDC($hCDC)

;_ScreenCapture_SaveImage(@DesktopDir&"\window.jpg", $hBMP)
;_WinAPI_DeleteObject($hBMP)

Return $hBMP

EndFunc ;==>_WinCapture

Share this post


Link to post
Share on other sites

Sorry I meant there is a windows dll that will return images of minimized GUI's... I just forget what it is....


[center][/center][center]=][u][/u][/center][center][/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0