Skrip Posted August 5, 2006 Share Posted August 5, 2006 (edited) expandcollapse popupFunc _GetVideo() If IsObj($colItems) Then For $objItem In $colItems $strAcceleratorCapabilities = $objItem.AcceleratorCapabilities (0) $Output = $Output & "AcceleratorCapabilities: " & $strAcceleratorCapabilities & @CRLF $Output = $Output & "AdapterCompatibility: " & $objItem.AdapterCompatibility & @CRLF $Output = $Output & "AdapterDACType: " & $objItem.AdapterDACType & @CRLF $Output = $Output & "AdapterRAM: " & $objItem.AdapterRAM & @CRLF $Output = $Output & "Availability: " & $objItem.Availability & @CRLF $strCapabilityDescriptions = $objItem.CapabilityDescriptions (0) $Output = $Output & "CapabilityDescriptions: " & $strCapabilityDescriptions & @CRLF $Output = $Output & "Caption: " & $objItem.Caption & @CRLF $Output = $Output & "ColorTableEntries: " & $objItem.ColorTableEntries & @CRLF $Output = $Output & "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF $Output = $Output & "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF $Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF $Output = $Output & "CurrentBitsPerPixel: " & $objItem.CurrentBitsPerPixel & @CRLF $Output = $Output & "CurrentHorizontalResolution: " & $objItem.CurrentHorizontalResolution & @CRLF $Output = $Output & "CurrentNumberOfColors: " & $objItem.CurrentNumberOfColors & @CRLF $Output = $Output & "CurrentNumberOfColumns: " & $objItem.CurrentNumberOfColumns & @CRLF $Output = $Output & "CurrentNumberOfRows: " & $objItem.CurrentNumberOfRows & @CRLF $Output = $Output & "CurrentRefreshRate: " & $objItem.CurrentRefreshRate & @CRLF $Output = $Output & "CurrentScanMode: " & $objItem.CurrentScanMode & @CRLF $Output = $Output & "CurrentVerticalResolution: " & $objItem.CurrentVerticalResolution & @CRLF $Output = $Output & "Description: " & $objItem.Description & @CRLF $Output = $Output & "DeviceID: " & $objItem.DeviceID & @CRLF $Output = $Output & "DeviceSpecificPens: " & $objItem.DeviceSpecificPens & @CRLF $Output = $Output & "DitherType: " & $objItem.DitherType & @CRLF $Output = $Output & "DriverDate: " & WMIDateStringToDate($objItem.DriverDate) & @CRLF $Output = $Output & "DriverVersion: " & $objItem.DriverVersion & @CRLF $Output = $Output & "ErrorCleared: " & $objItem.ErrorCleared & @CRLF $Output = $Output & "ErrorDescription: " & $objItem.ErrorDescription & @CRLF $Output = $Output & "ICMIntent: " & $objItem.ICMIntent & @CRLF $Output = $Output & "ICMMethod: " & $objItem.ICMMethod & @CRLF $Output = $Output & "InfFilename: " & $objItem.InfFilename & @CRLF $Output = $Output & "InfSection: " & $objItem.InfSection & @CRLF $Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF $Output = $Output & "InstalledDisplayDrivers: " & $objItem.InstalledDisplayDrivers & @CRLF $Output = $Output & "LastErrorCode: " & $objItem.LastErrorCode & @CRLF $Output = $Output & "MaxMemorySupported: " & $objItem.MaxMemorySupported & @CRLF $Output = $Output & "MaxNumberControlled: " & $objItem.MaxNumberControlled & @CRLF $Output = $Output & "MaxRefreshRate: " & $objItem.MaxRefreshRate & @CRLF $Output = $Output & "MinRefreshRate: " & $objItem.MinRefreshRate & @CRLF $Output = $Output & "Monochrome: " & $objItem.Monochrome & @CRLF $Output = $Output & "Name: " & $objItem.Name & @CRLF $Output = $Output & "NumberOfColorPlanes: " & $objItem.NumberOfColorPlanes & @CRLF $Output = $Output & "NumberOfVideoPages: " & $objItem.NumberOfVideoPages & @CRLF $Output = $Output & "PNPDeviceID: " & $objItem.PNPDeviceID & @CRLF $strPowerManagementCapabilities = $objItem.PowerManagementCapabilities (0) $Output = $Output & "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF $Output = $Output & "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF $Output = $Output & "ProtocolSupported: " & $objItem.ProtocolSupported & @CRLF $Output = $Output & "ReservedSystemPaletteEntries: " & $objItem.ReservedSystemPaletteEntries & @CRLF $Output = $Output & "SpecificationVersion: " & $objItem.SpecificationVersion & @CRLF $Output = $Output & "Status: " & $objItem.Status & @CRLF $Output = $Output & "StatusInfo: " & $objItem.StatusInfo & @CRLF $Output = $Output & "SystemCreationClassName: " & $objItem.SystemCreationClassName & @CRLF $Output = $Output & "SystemName: " & $objItem.SystemName & @CRLF $Output = $Output & "SystemPaletteEntries: " & $objItem.SystemPaletteEntries & @CRLF $Output = $Output & "TimeOfLastReset: " & WMIDateStringToDate($objItem.TimeOfLastReset) & @CRLF $Output = $Output & "VideoArchitecture: " & $objItem.VideoArchitecture & @CRLF $Output = $Output & "VideoMemoryType: " & $objItem.VideoMemoryType & @CRLF $Output = $Output & "VideoMode: " & $objItem.VideoMode & @CRLF $Output = $Output & "VideoModeDescription: " & $objItem.VideoModeDescription & @CRLF $Output = $Output & "VideoProcessor: " & $objItem.VideoProcessor & @CRLF If MsgBox(1, "WMI Output", $Output) = 2 Then ExitLoop $Output = "" Next Else MsgBox(0, "WMI Output", "No WMI Objects Found for class: " & "Win32_VideoController") EndIf EndFunc ;==>_GetVideo Func WMIDateStringToDate($dtmDate) Return (StringMid($dtmDate, 5, 2) & "/" & _ StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _ & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate, 13, 2)) EndFunc ;==>WMIDateStringToDate C:\AutoIt3\abc.au3(4) : ==> The requested action with this object has failed.: $strAcceleratorCapabilities = $objItem.AcceleratorCapabilities (0) $strAcceleratorCapabilities = $objItem.AcceleratorCapabilities (0)^ ERROR Error^ Why won't this work? Edited August 5, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Skrip Posted August 5, 2006 Author Share Posted August 5, 2006 bump... It can't be that hard to fix. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
nfwu Posted August 6, 2006 Share Posted August 6, 2006 First try checking the documenation for the object, or post a link to it here. #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
GaryFrost Posted August 9, 2006 Share Posted August 9, 2006 being you didn't post all the code, I would have to assume that you've missed something, this is what i posted from Scriptomaticexpandcollapse popup; Generated by AutoIt Scriptomatic $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $Output="" $Output = $Output & "Computer: " & $strComputer & @CRLF $Output = $Output & "==========================================" & @CRLF $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_VideoController", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then For $objItem In $colItems $strAcceleratorCapabilities = $objItem.AcceleratorCapabilities(0) $Output = $Output & "AcceleratorCapabilities: " & $strAcceleratorCapabilities & @CRLF $Output = $Output & "AdapterCompatibility: " & $objItem.AdapterCompatibility & @CRLF $Output = $Output & "AdapterDACType: " & $objItem.AdapterDACType & @CRLF $Output = $Output & "AdapterRAM: " & $objItem.AdapterRAM & @CRLF $Output = $Output & "Availability: " & $objItem.Availability & @CRLF $strCapabilityDescriptions = $objItem.CapabilityDescriptions(0) $Output = $Output & "CapabilityDescriptions: " & $strCapabilityDescriptions & @CRLF $Output = $Output & "Caption: " & $objItem.Caption & @CRLF $Output = $Output & "ColorTableEntries: " & $objItem.ColorTableEntries & @CRLF $Output = $Output & "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF $Output = $Output & "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF $Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF $Output = $Output & "CurrentBitsPerPixel: " & $objItem.CurrentBitsPerPixel & @CRLF $Output = $Output & "CurrentHorizontalResolution: " & $objItem.CurrentHorizontalResolution & @CRLF $Output = $Output & "CurrentNumberOfColors: " & $objItem.CurrentNumberOfColors & @CRLF $Output = $Output & "CurrentNumberOfColumns: " & $objItem.CurrentNumberOfColumns & @CRLF $Output = $Output & "CurrentNumberOfRows: " & $objItem.CurrentNumberOfRows & @CRLF $Output = $Output & "CurrentRefreshRate: " & $objItem.CurrentRefreshRate & @CRLF $Output = $Output & "CurrentScanMode: " & $objItem.CurrentScanMode & @CRLF $Output = $Output & "CurrentVerticalResolution: " & $objItem.CurrentVerticalResolution & @CRLF $Output = $Output & "Description: " & $objItem.Description & @CRLF $Output = $Output & "DeviceID: " & $objItem.DeviceID & @CRLF $Output = $Output & "DeviceSpecificPens: " & $objItem.DeviceSpecificPens & @CRLF $Output = $Output & "DitherType: " & $objItem.DitherType & @CRLF $Output = $Output & "DriverDate: " & WMIDateStringToDate($objItem.DriverDate) & @CRLF $Output = $Output & "DriverVersion: " & $objItem.DriverVersion & @CRLF $Output = $Output & "ErrorCleared: " & $objItem.ErrorCleared & @CRLF $Output = $Output & "ErrorDescription: " & $objItem.ErrorDescription & @CRLF $Output = $Output & "ICMIntent: " & $objItem.ICMIntent & @CRLF $Output = $Output & "ICMMethod: " & $objItem.ICMMethod & @CRLF $Output = $Output & "InfFilename: " & $objItem.InfFilename & @CRLF $Output = $Output & "InfSection: " & $objItem.InfSection & @CRLF $Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF $Output = $Output & "InstalledDisplayDrivers: " & $objItem.InstalledDisplayDrivers & @CRLF $Output = $Output & "LastErrorCode: " & $objItem.LastErrorCode & @CRLF $Output = $Output & "MaxMemorySupported: " & $objItem.MaxMemorySupported & @CRLF $Output = $Output & "MaxNumberControlled: " & $objItem.MaxNumberControlled & @CRLF $Output = $Output & "MaxRefreshRate: " & $objItem.MaxRefreshRate & @CRLF $Output = $Output & "MinRefreshRate: " & $objItem.MinRefreshRate & @CRLF $Output = $Output & "Monochrome: " & $objItem.Monochrome & @CRLF $Output = $Output & "Name: " & $objItem.Name & @CRLF $Output = $Output & "NumberOfColorPlanes: " & $objItem.NumberOfColorPlanes & @CRLF $Output = $Output & "NumberOfVideoPages: " & $objItem.NumberOfVideoPages & @CRLF $Output = $Output & "PNPDeviceID: " & $objItem.PNPDeviceID & @CRLF $strPowerManagementCapabilities = $objItem.PowerManagementCapabilities(0) $Output = $Output & "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF $Output = $Output & "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF $Output = $Output & "ProtocolSupported: " & $objItem.ProtocolSupported & @CRLF $Output = $Output & "ReservedSystemPaletteEntries: " & $objItem.ReservedSystemPaletteEntries & @CRLF $Output = $Output & "SpecificationVersion: " & $objItem.SpecificationVersion & @CRLF $Output = $Output & "Status: " & $objItem.Status & @CRLF $Output = $Output & "StatusInfo: " & $objItem.StatusInfo & @CRLF $Output = $Output & "SystemCreationClassName: " & $objItem.SystemCreationClassName & @CRLF $Output = $Output & "SystemName: " & $objItem.SystemName & @CRLF $Output = $Output & "SystemPaletteEntries: " & $objItem.SystemPaletteEntries & @CRLF $Output = $Output & "TimeOfLastReset: " & WMIDateStringToDate($objItem.TimeOfLastReset) & @CRLF $Output = $Output & "VideoArchitecture: " & $objItem.VideoArchitecture & @CRLF $Output = $Output & "VideoMemoryType: " & $objItem.VideoMemoryType & @CRLF $Output = $Output & "VideoMode: " & $objItem.VideoMode & @CRLF $Output = $Output & "VideoModeDescription: " & $objItem.VideoModeDescription & @CRLF $Output = $Output & "VideoProcessor: " & $objItem.VideoProcessor & @CRLF if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop $Output="" Next Else Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_VideoController" ) Endif Func WMIDateStringToDate($dtmDate) Return (StringMid($dtmDate, 5, 2) & "/" & _ StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _ & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2)) EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Skrip Posted August 10, 2006 Author Share Posted August 10, 2006 If IsObj($colItems) Then For $objItem In $colItems $Output = $Output & "Availability: " & $objItem.Availability & @CRLF $Output = $Output & "Caption: " & $objItem.Caption & @CRLF $Output = $Output & "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF $Output = $Output & "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF $Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF $Output = $Output & "Description: " & $objItem.Description & @CRLF $Output = $Output & "DeviceID: " & $objItem.DeviceID & @CRLF $Output = $Output & "DMABufferSize: " & $objItem.DMABufferSize & @CRLF $Output = $Output & "ErrorCleared: " & $objItem.ErrorCleared & @CRLF $Output = $Output & "ErrorDescription: " & $objItem.ErrorDescription & @CRLF $Output = $Output & "InstallDate: " & WMIDateStringToDates($objItem.InstallDate) & @CRLF $Output = $Output & "LastErrorCode: " & $objItem.LastErrorCode & @CRLF $Output = $Output & "Manufacturer: " & $objItem.Manufacturer & @CRLF $Output = $Output & "MPU401Address: " & $objItem.MPU401Address & @CRLF $Output = $Output & "Name: " & $objItem.Name & @CRLF $Output = $Output & "PNPDeviceID: " & $objItem.PNPDeviceID & @CRLF $strPowerManagementCapabilities = $objItem.PowerManagementCapabilities (0) $Output = $Output & "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF $Output = $Output & "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF $Output = $Output & "ProductName: " & $objItem.ProductName & @CRLF $Output = $Output & "Status: " & $objItem.Status & @CRLF $Output = $Output & "StatusInfo: " & $objItem.StatusInfo & @CRLF $Output = $Output & "SystemCreationClassName: " & $objItem.SystemCreationClassName & @CRLF $Output = $Output & "SystemName: " & $objItem.SystemName & @CRLF If MsgBox(1, "Sound Information", $Output) = 2 Then ExitLoop $Output = "" Next Else MsgBox(0, "WMI Output", "No WMI Objects Found for class: " & "Win32_SoundDevice") EndIfThat's audio, It only works once in a GUI. Please Fix. (Full Code HERE) [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
GaryFrost Posted August 10, 2006 Share Posted August 10, 2006 (edited) What I posted is Video "Win32_VideoController" Can't fix when you don't give enough code to show what's wrong. You are only providing a function you made that doesn't have all the pertinent code. Edited August 10, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Skrip Posted August 10, 2006 Author Share Posted August 10, 2006 (edited) Oh Right, Your code above did work, thank you! Edited August 10, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] 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