Sign in to follow this  
Followers 0
Achilles

A GUI camera

17 posts in this topic

#1 ·  Posted (edited)

This is a camera I made and it save you the trouble of cropping.

;Thanks to LazyCat for the .dll

#include <GUIConstants.au3>

$gui = GuiCreate('Camera', 400, 400, '', '', Bitand($WS_THICKFRAME, $WS_SIZEBOX))
WinSetTrans('Camera', '', 140)

$capture = GUICtrlCreateButton ("Capture Screen (within the 'camera' window)", 20, 340,250,30)
GUICtrlSetResizing ($capture,$GUI_DOCKBOTTOM+$GUI_DOCKSIZE+$GUI_DOCKHCENTER)
$exit = GUICtrlCreateButton ("Exit", 290, 340, 90, 30)
GUICtrlSetResizing ($exit,$GUI_DOCKBOTTOM+$GUI_DOCKSIZE+$GUI_DOCKHCENTER)
GuiSetState()

While 1 
    $msg = GuiGetMsg()
        If $msg = $GUI_EVENT_CLOSE or $msg = $exit then Exit                    
        If $msg = $capture then 
            $pos = WinGetPos('Camera')
            $time = @Hour & "-" & @MIN & "-" & @SEC
            DllCall("captdll.dll", "int", "CaptureRegion", "Str", "Picture" & $time & ".bmp", "int", $pos[0]+ 2 , "int", $pos[1] + 22, "int", $pos[2] - 2, "int", $pos[3] - 21, "int", -1)
        Endif
Wend

Let me know what you think

captdll.dll

Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites



Lazycat created it. Here is the link.


A little reading goes a long way. Post count means nothing.

Share this post


Link to post
Share on other sites

Cool. I was thinking of making something like this.

Share this post


Link to post
Share on other sites

Where is the picture output as?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Where is the picture output as?

It goes to the ScriptDir...

RE to D-Generation X: Thanks

RE to Snarg: Ok, thanks I'll mention him in the script

Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

thats one way to do it....or you could just alt+printscreen :P


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Yeah and you can only have on thing on the clipboard at a time, this would allow very fast picture taking/saving. Great work!

EDIT: :P couldn't figure out why it wasn't working... hmmm maybe I should've downloaded the .dll... lol

Edited by dandymcgee

- Dan [Website]

Share this post


Link to post
Share on other sites

you should make it completely transparent and make it set itself to the size of the currently active window and then when you press a hotkey itll save it to your desktop or wherever

Share this post


Link to post
Share on other sites

you should make it completely transparent and make it set itself to the size of the currently active window and then when you press a hotkey itll save it to your desktop or wherever

Well, the point of the program isn't really to just take a picture of a window, it's more for easier cropping or taking pictures of internet. But I think I'll try 'cause it could be useful too... I'll post the code if I get it working.


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

Helpful hint , WinGetClientSize, WinGetPos, and GuiSetCoord

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Well then you could make it open paint and press ^V

That's one of the whole points of the program... It saves you from having to open paint and pasting and saving...

Helpful hint , WinGetClientSize, WinGetPos, and GuiSetCoord

Thanks, those look helpful... Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

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