添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
严肃的筷子  ·  Webcam input three.js ...·  1 周前    · 
怕老婆的西装  ·  Ljtheg Female ...·  7 月前    · 
灰常酷的小马驹  ·  Webcam - present or ...·  1 年前    · 
孤独求败  ·  Webcam Model ...·  1 年前    · 
1290183444  ·  Webcam Model ...·  1 年前    · 
刚失恋的拐杖  ·  Remote host closed ...·  2 周前    · 
睿智的楼房  ·  Gentoo Forums :: View ...·  1 月前    · 
How I can detect with Autoit if a webcam in system present? I don't need to manage the camera, but only discover availability. Any idee?
Thanks for help! ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------ - Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ---------- Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area Func WebCam ( ) $PnPobjWMIService = ObjGet ( "winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\cimv2" ) $colItemsPnP = $PnPobjWMIService . ExecQuery ( "SELECT PNPClass from Win32_PnPEntity" ) Local $PnPDevices [ 1000 ] [ 1 ] , $i = 0 For $objItemPnP in $colItemsPnP With $objItemPnP $PnPDevices [ $i ] [ 0 ] = . PNPClass EndWith $i += 1 Return _ ArraySearch ( $PnPDevices , 'Camera' ) EndFunc It would be nice to see your opinion :)

@AlexGo
Happy to have helped :)
By the way, I was thinking that you can "short" your code in this way, premising that you have only a webcam :)
$PnPobjWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\cimv2")
$colItemsPnP = $PnPobjWMIService.ExecQuery("SELECT Description from Win32_PnPEntity")
For $objItemPnP in $colItemsPnP
    If $objItemPnP.Description = "USB-Videogerät" Then Exit MsgBox(0,"","Webcam ist verfügbar")
MsgBox (0,"", "Webcam ist nicht verfügbar")
Func WebCam ( ) $PnPobjWMIService = ObjGet ( "winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\cimv2" ) $colItemsPnP = $PnPobjWMIService . ExecQuery ( "SELECT PNPClass, Caption from Win32_PnPEntity" ) Local $PnPDevices [ 1000 ] [ 2 ] , $i = 0 For $objItemPnP in $colItemsPnP With $objItemPnP $PnPDevices [ $i ] [ 0 ] = . PNPClass $PnPDevices [ $i ] [ 1 ] = . Caption EndWith $i += 1 $wCamera = _ ArraySearch ( $PnPDevices , 'Camera' ) $wImage = _ ArraySearch ( $PnPDevices , 'Image' ) If $wCamera = - 1 And $wImage = - 1 Then Msgbox ( 1 , "" , "Wecam is not available" ) Msgbox ( 1 , "" , "Wecam is available" ) EndIf EndFunc if a system has a scanner then :>