Sign in to follow this  
Followers 0
jvanegmond

Desktop scanner

5 posts in this topic

I strongly suggest to try this, it's kind of a mess. What it does is it checks every other $stepsize pixel and then makes a little GUI window in the top left corner to represent that pixel. I don't know why i'm building this, it's just fun.

Oh yeah, the error... Well, i originally made it to work with a stepsize of 1, but then i didn't even got close to having halve a line done.. Does it have something to do with a GUI limit?

#include "GUIConstants.au3"

HotKeySet("{END}", "End")

Dim $temp_style = BitOR($WS_POPUP, $WS_SYSMENU)
Dim $temp_exstyle = BitOR( $WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)
Dim $color, $pos, $x, $y, $stepsize
$stepsize = "10"

For $x = 0 to 1024 Step $stepsize
    For $y = 0 to 768 Step $stepsize
        $color = PixelGetColor($x , $y)
        GUICreate( $x & " " & $y, $stepsize / 2, $stepsize / 2, $x / 3 , $y / 3 , $temp_style , $temp_exstyle)
        GUISetBkColor ( $color )
        GUISetState (@SW_SHOW)
    Next
Next

Func End()
    Exit
EndFunc

Share this post


Link to post
Share on other sites



its much... much faster to take a pic and display it in the corner

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

like this

** tested **

#include "GUIConstants.au3"
$CLoc =  @TempDir & "\"
$CFile = "Dumppic.jpg"
$CProgram = $CLoc & "captplugin.dll"
FileInstall("C:\Program Files\AutoIt3\Examples\My Stuff\captplugin.dll", $CProgram)
Dim $pic
_GuiCreater()

While 1
    sleep(5000)
    _get_pic()
WEnd


Func _get_pic()
$hPlugin = PluginOpen($CProgram)
CaptureScreen($CLoc & $CFile, 85)
PluginClose($hPlugin)
GUICtrlSetImage( $pic, $CLoc & $CFile)
EndFunc

Func _GuiCreater()
    GUICreate("My Pic", 200, 200, 10, 10, $WS_POPUP, $WS_EX_TOPMOST )
    $pic = GUICtrlCreatePic($CLoc & $CFile, 0, 0, 200, 200)
    GUISetState()
EndFunc

requires Lazycats captplugin.dll

http://www.autoitscript.com/forum/index.ph...CaptureRegion(#

8)

Edited by Valuater

NEWHeader1.png

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