Sign in to follow this  
Followers 0

WebCam example

85 posts in this topic

Posted (edited)

$WM_CAP_START = 0x400
$WM_CAP_UNICODE_START = $WM_CAP_START +100 
$WM_CAP_PAL_SAVEA = $WM_CAP_START + 81 
$WM_CAP_PAL_SAVEW = $WM_CAP_UNICODE_START + 81 
$WM_CAP_UNICODE_END = $WM_CAP_PAL_SAVEW 
$WM_CAP_ABORT = $WM_CAP_START + 69 
$WM_CAP_DLG_VIDEOCOMPRESSION = $WM_CAP_START + 46 
$WM_CAP_DLG_VIDEODISPLAY = $WM_CAP_START + 43 
$WM_CAP_DLG_VIDEOFORMAT = $WM_CAP_START + 41 
$WM_CAP_DLG_VIDEOSOURCE = $WM_CAP_START + 42 
$WM_CAP_DRIVER_CONNECT = $WM_CAP_START + 10 
$WM_CAP_DRIVER_DISCONNECT = $WM_CAP_START + 11 
$WM_CAP_DRIVER_GET_CAPS = $WM_CAP_START + 14 
$WM_CAP_DRIVER_GET_NAMEA = $WM_CAP_START + 12 
$WM_CAP_DRIVER_GET_NAMEW = $WM_CAP_UNICODE_START + 12 
$WM_CAP_DRIVER_GET_VERSIONA = $WM_CAP_START + 13 
$WM_CAP_DRIVER_GET_VERSIONW = $WM_CAP_UNICODE_START + 13 
$WM_CAP_EDIT_COPY = $WM_CAP_START + 30 
$WM_CAP_END = $WM_CAP_UNICODE_END 
$WM_CAP_FILE_ALLOCATE = $WM_CAP_START + 22 
$WM_CAP_FILE_GET_CAPTURE_FILEA = $WM_CAP_START + 21 
$WM_CAP_FILE_GET_CAPTURE_FILEW = $WM_CAP_UNICODE_START + 21 
$WM_CAP_FILE_SAVEASA = $WM_CAP_START + 23 
$WM_CAP_FILE_SAVEASW = $WM_CAP_UNICODE_START + 23 
$WM_CAP_FILE_SAVEDIBA = $WM_CAP_START + 25 
$WM_CAP_FILE_SAVEDIBW = $WM_CAP_UNICODE_START + 25 
$WM_CAP_FILE_SET_CAPTURE_FILEA = $WM_CAP_START + 20 
$WM_CAP_FILE_SET_CAPTURE_FILEW = $WM_CAP_UNICODE_START + 20 
$WM_CAP_FILE_SET_INFOCHUNK = $WM_CAP_START + 24 
$WM_CAP_GET_AUDIOFORMAT = $WM_CAP_START + 36 
$WM_CAP_GET_CAPSTREAMPTR = $WM_CAP_START + 1 
$WM_CAP_GET_MCI_DEVICEA = $WM_CAP_START + 67 
$WM_CAP_GET_MCI_DEVICEW = $WM_CAP_UNICODE_START + 67 
$WM_CAP_GET_SEQUENCE_SETUP = $WM_CAP_START + 65 
$WM_CAP_GET_STATUS = $WM_CAP_START + 54 
$WM_CAP_GET_USER_DATA = $WM_CAP_START + 8 
$WM_CAP_GET_VIDEOFORMAT = $WM_CAP_START + 44 
$WM_CAP_GRAB_FRAME = $WM_CAP_START + 60 
$WM_CAP_GRAB_FRAME_NOSTOP = $WM_CAP_START + 61 
$WM_CAP_PAL_AUTOCREATE = $WM_CAP_START + 83 
$WM_CAP_PAL_MANUALCREATE = $WM_CAP_START + 84 
$WM_CAP_PAL_OPENA = $WM_CAP_START + 80 
$WM_CAP_PAL_OPENW = $WM_CAP_UNICODE_START + 80 
$WM_CAP_PAL_PASTE = $WM_CAP_START + 82 
$WM_CAP_SEQUENCE = $WM_CAP_START + 62 
$WM_CAP_SEQUENCE_NOFILE = $WM_CAP_START + 63 
$WM_CAP_SET_AUDIOFORMAT = $WM_CAP_START + 35 
$WM_CAP_SET_CALLBACK_CAPCONTROL = $WM_CAP_START + 85 
$WM_CAP_SET_CALLBACK_ERRORA = $WM_CAP_START + 2 
$WM_CAP_SET_CALLBACK_ERRORW = $WM_CAP_UNICODE_START + 2 
$WM_CAP_SET_CALLBACK_FRAME = $WM_CAP_START + 5 
$WM_CAP_SET_CALLBACK_STATUSA = $WM_CAP_START + 3 
$WM_CAP_SET_CALLBACK_STATUSW = $WM_CAP_UNICODE_START + 3 
$WM_CAP_SET_CALLBACK_VIDEOSTREAM = $WM_CAP_START + 6 
$WM_CAP_SET_CALLBACK_WAVESTREAM = $WM_CAP_START + 7 
$WM_CAP_SET_CALLBACK_YIELD = $WM_CAP_START + 4 
$WM_CAP_SET_MCI_DEVICEA = $WM_CAP_START + 66 
$WM_CAP_SET_MCI_DEVICEW = $WM_CAP_UNICODE_START + 66 
$WM_CAP_SET_OVERLAY = $WM_CAP_START + 51 
$WM_CAP_SET_PREVIEW = $WM_CAP_START + 50 
$WM_CAP_SET_PREVIEWRATE = $WM_CAP_START + 52 
$WM_CAP_SET_SCALE = $WM_CAP_START + 53 
$WM_CAP_SET_SCROLL = $WM_CAP_START + 55 
$WM_CAP_SET_SEQUENCE_SETUP = $WM_CAP_START + 64 
$WM_CAP_SET_USER_DATA = $WM_CAP_START + 9 
$WM_CAP_SET_VIDEOFORMAT = $WM_CAP_START + 45 
$WM_CAP_SINGLE_FRAME = $WM_CAP_START + 72 
$WM_CAP_SINGLE_FRAME_CLOSE = $WM_CAP_START + 71 
$WM_CAP_SINGLE_FRAME_OPEN = $WM_CAP_START + 70 
$WM_CAP_STOP = $WM_CAP_START + 68

#include <GUIConstants.au3>
$avi = DllOpen("avicap32.dll")
$user = DllOpen("user32.dll")
$snapfile = @ScriptDir & "\scrshot.bmp"

$Main = GUICreate("Camera",350,270)
$cap = DllCall($avi, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD,$WS_VISIBLE), "int", 15, "int", 15, "int", 320, "int", 240, "hwnd", $Main, "int", 1)

DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DRIVER_CONNECT, "int", 0, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_SCALE, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_OVERLAY, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_PREVIEW, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_PREVIEWRATE, "int", 1, "int", 0)

GUISetState(@SW_SHOW)
HotKeySet("{INSERT}", "SnapShot"); Press 'Insert' to make a SnapShot !

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
    ;DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_CALLBACK_FRAME, "int", 0, "int", 0)
        DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_END, "int", 0, "int", 0)
        DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DRIVER_DISCONNECT, "int", 0, "int", 0)
    ;DllClose($avi)
        DllClose($user)
        Exit
    EndIf
    Sleep(1)
Wend

Func SnapShot()
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_GRAB_FRAME_NOSTOP, "int", 0, "int", 0)
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_FILE_SAVEDIBA, "int", 0, "str", $snapfile)
EndFunc

Maybe someone would find it useful. Insert is the HotKey for making photos.

Edited by rysiora
mLipok likes this

Share this post


Link to post
Share on other sites



Posted (edited)

Interesting... Stick this into Valuater's PC LOCKOUT and there you go! You can actually take a pic of who was trying to break in!

My laptop has a embedded webcam, so i can make use of this.

#)

Edited by nfwu

Share this post


Link to post
Share on other sites

Posted

@rysiora

Only a black screen comes up using my WebCam ?

Share this post


Link to post
Share on other sites

Posted

Hello.

Nice Script. But how i can record to a avi (or better mpg)??

Share this post


Link to post
Share on other sites

Posted

This is amazing! I've wondered how to do this for ages...

Share this post


Link to post
Share on other sites

Posted

Very nice! Just tried, this also work fine with my TV Tuner. Though it's initialization take a lot time.

Share this post


Link to post
Share on other sites

Posted (edited)

Only a black screen comes up using my WebCam ?

Are you sure you have drivers installed and your cam is working in other programs? Or maybe you have your cam connected with other computer and using it by network - if so I can't help you yet.

You can try to change

DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DRIVER_CONNECT, "int", 1, "int", 0)

To 1,2 or other number if you have few devices/drivers of this type and your video driver is not the first one(index 0 is default).

Nice Script. But how i can record to a avi (or better mpg)??

Here is a sample of capturing to avi. It's not working perfectly, its very slow and sometimes stopping but it should work

;SIMPLY ADD THIS TO PREVIOUS SCRIPT FROM MY FIRST POST.


HotKeySet("{HOME}", "StartRecording"); Press 'Home' to start recording !

Func StartRecording()
    WinSetTitle($Main, "", "WebCam - Capturing...")
    HotKeySet("{HOME}", "StopRecording")
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_FILE_SET_CAPTURE_FILEA, "int", 0, "str", $moviefile)
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SEQUENCE, "int", 0, "int", 0)
EndFunc

Func StopRecording()
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_STOP, "int", 0, "int", 0)
    WinSetTitle($Main, "", "WebCam - Ready")
    HotKeySet("{HOME}", "StartRecording")
EndFunc
Edited by rysiora

Share this post


Link to post
Share on other sites

Posted (edited)

Indead there seems something wrong with the driver.

I will have to fix that first.

Excuse meee !

EDIT : WORKS PERFECT after fixing the driver problem on my machine

Great job !!

Edited by ptrex

Share this post


Link to post
Share on other sites

Posted

The video recording works nice but a bit slow.

Share this post


Link to post
Share on other sites

Posted

Dude this is awesome !

Share this post


Link to post
Share on other sites

Posted

This is awesome!! I doubt its possible but making an EyeToy type game with autoit would pwn

Share this post


Link to post
Share on other sites

Posted

OH MY GOD!!! I was looking for a program that can take snapshots and record video with my camera (it didn't include software/ or even say it can record video everything i found.. blatently sucked.. and TOO think this could be done with autoit is freaking incredible! it even records sound with the video , thanks for sharing rysiora!! :D

Share this post


Link to post
Share on other sites

Posted

can somebody make this into a UDF, pretty please

Share this post


Link to post
Share on other sites

Posted

@nfwu suggested to put in Valuaters lockout

Here is some code i writted press numpad 2 and it will take some pictures when a person push a button on the keyboard press 2 again and it will ask for a password that if it is correct will turn off the capturing of images

Please report if i made something wrong in this code

$WM_CAP_START = 0x400
$WM_CAP_UNICODE_START = $WM_CAP_START +100
$WM_CAP_PAL_SAVEA = $WM_CAP_START + 81
$WM_CAP_PAL_SAVEW = $WM_CAP_UNICODE_START + 81
$WM_CAP_UNICODE_END = $WM_CAP_PAL_SAVEW
$WM_CAP_ABORT = $WM_CAP_START + 69
$WM_CAP_DLG_VIDEOCOMPRESSION = $WM_CAP_START + 46
$WM_CAP_DLG_VIDEODISPLAY = $WM_CAP_START + 43
$WM_CAP_DLG_VIDEOFORMAT = $WM_CAP_START + 41
$WM_CAP_DLG_VIDEOSOURCE = $WM_CAP_START + 42
$WM_CAP_DRIVER_CONNECT = $WM_CAP_START + 10
$WM_CAP_DRIVER_DISCONNECT = $WM_CAP_START + 11
$WM_CAP_DRIVER_GET_CAPS = $WM_CAP_START + 14
$WM_CAP_DRIVER_GET_NAMEA = $WM_CAP_START + 12
$WM_CAP_DRIVER_GET_NAMEW = $WM_CAP_UNICODE_START + 12
$WM_CAP_DRIVER_GET_VERSIONA = $WM_CAP_START + 13
$WM_CAP_DRIVER_GET_VERSIONW = $WM_CAP_UNICODE_START + 13
$WM_CAP_EDIT_COPY = $WM_CAP_START + 30
$WM_CAP_END = $WM_CAP_UNICODE_END
$WM_CAP_FILE_ALLOCATE = $WM_CAP_START + 22
$WM_CAP_FILE_GET_CAPTURE_FILEA = $WM_CAP_START + 21
$WM_CAP_FILE_GET_CAPTURE_FILEW = $WM_CAP_UNICODE_START + 21
$WM_CAP_FILE_SAVEASA = $WM_CAP_START + 23
$WM_CAP_FILE_SAVEASW = $WM_CAP_UNICODE_START + 23
$WM_CAP_FILE_SAVEDIBA = $WM_CAP_START + 25
$WM_CAP_FILE_SAVEDIBW = $WM_CAP_UNICODE_START + 25
$WM_CAP_FILE_SET_CAPTURE_FILEA = $WM_CAP_START + 20
$WM_CAP_FILE_SET_CAPTURE_FILEW = $WM_CAP_UNICODE_START + 20
$WM_CAP_FILE_SET_INFOCHUNK = $WM_CAP_START + 24
$WM_CAP_GET_AUDIOFORMAT = $WM_CAP_START + 36
$WM_CAP_GET_CAPSTREAMPTR = $WM_CAP_START + 1
$WM_CAP_GET_MCI_DEVICEA = $WM_CAP_START + 67
$WM_CAP_GET_MCI_DEVICEW = $WM_CAP_UNICODE_START + 67
$WM_CAP_GET_SEQUENCE_SETUP = $WM_CAP_START + 65
$WM_CAP_GET_STATUS = $WM_CAP_START + 54
$WM_CAP_GET_USER_DATA = $WM_CAP_START + 8
$WM_CAP_GET_VIDEOFORMAT = $WM_CAP_START + 44
$WM_CAP_GRAB_FRAME = $WM_CAP_START + 60
$WM_CAP_GRAB_FRAME_NOSTOP = $WM_CAP_START + 61
$WM_CAP_PAL_AUTOCREATE = $WM_CAP_START + 83
$WM_CAP_PAL_MANUALCREATE = $WM_CAP_START + 84
$WM_CAP_PAL_OPENA = $WM_CAP_START + 80
$WM_CAP_PAL_OPENW = $WM_CAP_UNICODE_START + 80
$WM_CAP_PAL_PASTE = $WM_CAP_START + 82
$WM_CAP_SEQUENCE = $WM_CAP_START + 62
$WM_CAP_SEQUENCE_NOFILE = $WM_CAP_START + 63
$WM_CAP_SET_AUDIOFORMAT = $WM_CAP_START + 35
$WM_CAP_SET_CALLBACK_CAPCONTROL = $WM_CAP_START + 85
$WM_CAP_SET_CALLBACK_ERRORA = $WM_CAP_START + 2
$WM_CAP_SET_CALLBACK_ERRORW = $WM_CAP_UNICODE_START + 2
$WM_CAP_SET_CALLBACK_FRAME = $WM_CAP_START + 5
$WM_CAP_SET_CALLBACK_STATUSA = $WM_CAP_START + 3
$WM_CAP_SET_CALLBACK_STATUSW = $WM_CAP_UNICODE_START + 3
$WM_CAP_SET_CALLBACK_VIDEOSTREAM = $WM_CAP_START + 6
$WM_CAP_SET_CALLBACK_WAVESTREAM = $WM_CAP_START + 7
$WM_CAP_SET_CALLBACK_YIELD = $WM_CAP_START + 4
$WM_CAP_SET_MCI_DEVICEA = $WM_CAP_START + 66
$WM_CAP_SET_MCI_DEVICEW = $WM_CAP_UNICODE_START + 66
$WM_CAP_SET_OVERLAY = $WM_CAP_START + 51
$WM_CAP_SET_PREVIEW = $WM_CAP_START + 50
$WM_CAP_SET_PREVIEWRATE = $WM_CAP_START + 52
$WM_CAP_SET_SCALE = $WM_CAP_START + 53
$WM_CAP_SET_SCROLL = $WM_CAP_START + 55
$WM_CAP_SET_SEQUENCE_SETUP = $WM_CAP_START + 64
$WM_CAP_SET_USER_DATA = $WM_CAP_START + 9
$WM_CAP_SET_VIDEOFORMAT = $WM_CAP_START + 45
$WM_CAP_SINGLE_FRAME = $WM_CAP_START + 72
$WM_CAP_SINGLE_FRAME_CLOSE = $WM_CAP_START + 71
$WM_CAP_SINGLE_FRAME_OPEN = $WM_CAP_START + 70
$WM_CAP_STOP = $WM_CAP_START + 68

#include <GUIConstants.au3>
#include <Misc.au3>
Local $states
$pw="password"
$avi = DllOpen("avicap32.dll")
$user = DllOpen("user32.dll")
$snapfile = @ScriptDir & "\scrshot-"
HotKeySet("{NUMPAD2}","change")
$Main = GUICreate("Camera",350,350)
$cap = DllCall($avi, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD,$WS_VISIBLE), "int", 15, "int", 15, "int", 320, "int", 240, "hwnd", $Main, "int", 1)
$label=GUICtrlCreateLabel("You have been filmed",15,260)
$input=GUICtrlCreateInput("",15,280,200,25,$ES_PASSWORD)
$stop=GUICtrlCreateButton("Stop filming",215,280,90,25)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DRIVER_CONNECT, "int", 0, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_SCALE, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_OVERLAY, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_PREVIEW, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_PREVIEWRATE, "int", 1, "int", 0)

GUISetState(@SW_HIDE)


While 1
	$msg = GUIGetMsg()
	Switch $msg 
		Case $stop
		checkforpass()
EndSwitch
if $states = 1 Then
for $1=30 To 49
	sleep(2)
if _IsPressed($1) Then
for $1=0 to 20000
if FileExists(@ScriptDir&"\scrshot-"&$1&".bmp") Then

Else
SnapShot($1)
ExitLoop
EndIf
Next
EndIf
Next

for $1=50 To 59
	sleep(2)
if _IsPressed($1) Then
for $1=0 to 20000
if FileExists(@ScriptDir&"\scrshot-"&$1&".bmp") Then

Else
SnapShot($1)
ExitLoop
EndIf
Next
EndIf
Next
;==========
for $1=60 To 69
sleep(2)
if _IsPressed($1) Then
for $1=0 to 20000
if FileExists(@ScriptDir&"\scrshot-"&$1&".bmp") Then

Else
SnapShot($1)
ExitLoop
EndIf
Next
EndIf
Next
;==========
for $1=0 to 5
sleep(2)
Local $char=65+$1
if	_IsPressed(4&Chr($char)) Then
for $1=0 to 20000
if FileExists(@ScriptDir&"\scrshot-"&$1&".bmp") Then

Else
SnapShot($1)
ExitLoop
EndIf
Next
EndIf
Next
Else
;Do nothing
EndIf
Sleep(1)
Wend

Func SnapShot($para)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_GRAB_FRAME_NOSTOP, "int", 0, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_FILE_SAVEDIBA, "int", 0, "str", $snapfile&$para&".bmp")
EndFunc

Func wronganswer()
For $1=0 to 20000		
if FileExists(@ScriptDir&"\scrshot-"&$1&".bmp") Then
Else
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_GRAB_FRAME_NOSTOP, "int", 0, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_FILE_SAVEDIBA, "int", 0, "str", $snapfile&$1&".bmp")
ExitLoop
EndIf
Next
EndFunc

Func change()
if $states = 1 Then
GUISetState(@SW_SHOW)

Else
ToolTip("Ready",0,0)
Sleep(500)
ToolTip("",4000,0)
Global $states=1
GUISetState(@SW_HIDE)
EndIf	
EndFunc

Func checkforpass()
if GUICtrlRead($input) = $pw Then
	MsgBox(0,"","Welcome back. Filming stopped"&@CRLF&"Program will be running ready for filming in background")
	Global $states=0
	GUISetState(@SW_HIDE)
	Else
	wronganswer()
	MsgBox(0,"","Password Wrong. A picture have been added")
	GUISetState(@SW_HIDE)
EndIf
EndFunc

Share this post


Link to post
Share on other sites

Posted

Works like a charm on windows 2000 professional with SP 4 and a Logitech Quick Cam Express (USB 1.1).

Really nicly done. :D

Share this post


Link to post
Share on other sites

Posted

:D I gotta make a security cam that will email pics of who is logging on my computer..

thanks for the webcam stuff here.

Share this post


Link to post
Share on other sites

Posted

:D I gotta make a security cam that will email pics of who is logging on my computer..

thanks for the webcam stuff here.

great idea, I havent tested it yet with my cams but I wana see if there is a way to make a motion sensing cam or even better a motion tracking cam.

Thanks man

Share this post


Link to post
Share on other sites

Posted

I wana see if there is a way to make a motion sensing cam or even better a motion tracking cam.

:D go man go!!

Share this post


Link to post
Share on other sites

Posted

Are you sure you have drivers installed and your cam is working in other programs? Or maybe you have your cam connected with other computer and using it by network - if so I can't help you yet.

You can try to change

DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DRIVER_CONNECT, "int", 1, "int", 0)

To 1,2 or other number if you have few devices/drivers of this type and your video driver is not the first one(index 0 is default).

Here is a sample of capturing to avi. It's not working perfectly, its very slow and sometimes stopping but it should work

;SIMPLY ADD THIS TO PREVIOUS SCRIPT FROM MY FIRST POST.
HotKeySet("{HOME}", "StartRecording"); Press 'Home' to start recording !

Func StartRecording()
	DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_FILE_SET_CAPTURE_FILEA, "int", 0, "str", $moviefile)
	DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SEQUENCE, "int", 0, "int", 0)
	WinSetTitle($Main, "", "WebCam - Capturing...")
	HotKeySet("{HOME}", "StopRecording")
EndFunc

Func StopRecording()
	DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_STOP, "int", 0, "int", 0)
	WinSetTitle($Main, "", "WebCam - Ready")
	HotKeySet("{HOME}", "StartRecording")
EndFunc
This works but very laggy, it doesnt want to stop. do you know if it sits at the dll call or what?

Thanks, I love this

Share this post


Link to post
Share on other sites

Posted

works great !!!!

is it possible to save the image as a jpg and not a bmp

so that the resulting image will be much smaller in size?

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