MadaraUchiha Posted December 8, 2013 Share Posted December 8, 2013 Yo, I like to enumerate all connected webcams/videodevices of the computer. I know all the current Webcam UDF's here, so don't link me to them I like to try it myself, coding something from scratch What I like to achieve in the end is make a webcam snapshot by selecting the webcam by name, and then take a snapshot, without displaying the videosourcedialog. My first step to achieve this is to grab all webcam devices. So far, this lists the usb devices, and the last entry is the webcam. What does it show on your computer? If you reply, please tell me, how many webcams you have, what os, architecture and the webcam names^^ $strComputer = "." $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_PnPEntity where DeviceID like 'USB\\%'") If IsObj($colItems) then For $objItem In $colItems WriteDevice("--------------------------------------") WriteDevice("Caption: " & $objItem.Caption) WriteDevice("DeviceId: " & $objItem.DeviceID) Next Endif Func WriteDevice($sText) ConsoleWrite($sText & @LF) EndFunc How can I filter that it only displays video devices/webcams? I have 2 webcams on my pc, so it should show them, by there correct name Similar to Skype: A friend of mine tested my snippet above aswell, and he told me that the last entry is always the webcam. Can I filter them out somehow? And what if there are mote than one webcams? This is only the first step of 3, please only help me about the filtering part, atm i am not interessted in snapshoting yet. Thats the next step^^ Link to comment Share on other sites More sharing options...
MadaraUchiha Posted December 9, 2013 Author Share Posted December 9, 2013 No ideas?:/ Link to comment Share on other sites More sharing options...
tonycst Posted February 20, 2014 Share Posted February 20, 2014 I hate this stupid autoit code displayed in forum. If you copy and paste it in the script, it ends up being 1 line so i have to copy each line and paste it into eh script Link to comment Share on other sites More sharing options...
Gianni Posted February 20, 2014 Share Posted February 20, 2014 I hate this stupid autoit code displayed in forum. If you copy and paste it in the script, it ends up being 1 line so i have to copy each line and paste it into eh script this happens with Firefox. There is a workaround, just copy the code by selecting all, but leave out at least one character. Then paste it to SciTE, In this way all @cr will be preserved and you will have to enter by hand only the first (or the last) char. Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now