Jump to content

Search the Community

Showing results for tags 'unknownerror'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Good morning everyone I'm working on a little project, and, I encountered a little strange error when I try to add some data to an array... The code I wrote is this: Func _WMI_Get_Win32_TemperatureProbe($blnCanUseWMI, $blnCustomArrayDisplay = False, $blnReturnEU = False) If $blnCanUseWMI Then Local $objWMI_QueryResult = $objWMI.ExecQuery("SELECT * FROM Win32_TemperatureProbe", "WQL", 32) If @error Then __ConsoleWrite("Error executing the query on Win32_TemperatureProbe class.", @error, 9999) Else Local $arrWin32_TemperatureProbe[1][3] _ArrayDelete($arrWin32_TemperatureProbe, 0) If @error Then __ConsoleWrite("Error deleting the 0st element $arrWin32_TemperatureProbe array.", @error, 9999) Else Local $objWMI_Variable = Null, $strWMI_QueryResult = "", $i = 0 For $objWMI_Variable In $objWMI_QueryResult $strWMI_QueryResult &= "QUERY RESULT" & "|# " & $i & "|/" & @CRLF & _ "Accuracy" & "|" & $objWMI_Variable.Accuracy & "|" & "[sint32]" & @CRLF & _ "Availability" & "|" & $objWMI_Variable.Availability & "|" & "[uint16]" & @CRLF & _ "Caption" & "|" & $objWMI_Variable.Caption & "|" & "[string]" & @CRLF & _ "ConfigManagerErrorCode" & "|" & $objWMI_Variable.ConfigManagerErrorCode & "|" & "[uint32]" & @CRLF & _ "ConfigManagerUserConfig" & "|" & $objWMI_Variable.ConfigManagerUserConfig & "|" & "[boolean]" & @CRLF & _ "CreationClassName" & "|" & $objWMI_Variable.CreationClassName & "|" & "[string]" & @CRLF & _ "CurrentReading" & "|" & $objWMI_Variable.CurrentReading & "|" & "[sint32]" & @CRLF & _ "Description" & "|" & $objWMI_Variable.Description & "|" & "[string]" & @CRLF & _ "DeviceID" & "|" & $objWMI_Variable.DeviceID & "|" & "[string]" & @CRLF & _ "ErrorCleared" & "|" & $objWMI_Variable.ErrorCleared & "|" & "[boolean]" & @CRLF & _ "ErrorDescription" & "|" & $objWMI_Variable.ErrorDescription & "|" & "[string]" & @CRLF & _ "InstallDate" & "|" & $objWMI_Variable.InstallDate & "|" & "[datetime]" & @CRLF & _ "IsLinear" & "|" & $objWMI_Variable.IsLinear & "|" & "[boolean]" & @CRLF & _ "LastErrorCode" & "|" & $objWMI_Variable.LastErrorCode & "|" & "[uint32]" & @CRLF & _ "LowerThresholdCritical" & "|" & $objWMI_Variable.LowerThresholdCritical & "|" & "[sint32]" & @CRLF & _ "LowerThresholdFatal" & "|" & $objWMI_Variable.LowerThresholdFatal & "|" & "[sint32]" & @CRLF & _ "LowerThresholdNonCritical" & "|" & $objWMI_Variable.LowerThresholdNonCritical & "|" & "[sint32]" & @CRLF & _ "MaxReadable" & "|" & $objWMI_Variable.MaxReadable & "|" & "[sint32]" & @CRLF & _ "MinReadable" & "|" & $objWMI_Variable.MinReadable & "|" & "[sint32]" & @CRLF & _ "Name" & "|" & $objWMI_Variable.Name & "|" & "[string]" & @CRLF & _ "NominalReading" & "|" & $objWMI_Variable.NominalReading & "|" & "[sint32]" & @CRLF & _ "NormalMax" & "|" & $objWMI_Variable.NormalMax & "|" & "[sint32]" & @CRLF & _ "NormalMin" & "|" & $objWMI_Variable.NormalMin & "|" & "[sint32]" & @CRLF & _ "PNPDeviceID" & "|" & $objWMI_Variable.PNPDeviceID & "|" & "[string]" & @CRLF & _ "PowerManagementCapabilities" & "|" & $objWMI_Variable.PowerManagementCapabilities & "|" & "[uint16]" & @CRLF & _ "PowerManagementSupported" & "|" & $objWMI_Variable.PowerManagementSupported & "|" & "[boolean]" & @CRLF & _ "Resolution" & "|" & $objWMI_Variable.Resolution & "|" & "[uint32]" & @CRLF & _ "Status" & "|" & $objWMI_Variable.Status & "|" & "[string]" & @CRLF & _ "StatusInfo" & "|" & $objWMI_Variable.StatusInfo & "|" & "[uint16]" & @CRLF & _ "SystemCreationClassName" & "|" & $objWMI_Variable.SystemCreationClassName & "|" & "[string]" & @CRLF & _ "SystemName" & "|" & $objWMI_Variable.SystemName & "|" & "[string]" & @CRLF & _ "Tolerance" & "|" & $objWMI_Variable.Tolerance & "|" & "[sint32]" & @CRLF & _ "UpperThresholdCritical" & "|" & $objWMI_Variable.UpperThresholdCritical & "|" & "[sint32]" & @CRLF & _ "UpperThresholdFatal" & "|" & $objWMI_Variable.UpperThresholdFatal & "|" & "[sint32]" & @CRLF & _ "UpperThresholdNonCritical" & "|" & $objWMI_Variable.UpperThresholdNonCritical & "|" & "[sint32]" $i+=1 Next ConsoleWrite($strWMI_QueryResult & @CRLF) _ArrayAdd($arrWin32_TemperatureProbe, $strWMI_QueryResult) ; I'll wait for an answer... See you later :) If @error Then __ConsoleWrite("Error inserting item #" & $i & " in the $arrWin32_TemperatureProbe array.", @error, 9999) Else If $blnCustomArrayDisplay Then _ArrayDisplay($arrWin32_TemperatureProbe, "Win32_TemperatureProbe:", "", 64 + 32 + 4, "|", "VARIABLE NAME|ACTUAL VALUE|ENGINEERING UNIT", 350, 0xD3D3D3) If @error Then __ConsoleWrite("Error displaying the $arrWin32_TemperatureProbe array.", @error, 9999) EndIf EndIf If $blnReturnEU = False Then _ArrayColDelete($arrWin32_TemperatureProbe, 2) If @error Then __ConsoleWrite("Error deleting the column #2 of $arrWin32_TemperatureProbe array.") EndIf EndIf If IsArray($arrWin32_TemperatureProbe) Then Return $arrWin32_TemperatureProbe Else Return False EndIf EndIf EndIf EndIf EndIf EndFunc And I get this error ( undocumented in the Help File on _ArrayAdd() function ): [15/09/2017 10:24:46] : Error inserting item #4 in the $arrWin32_TemperatureProbe array. > Error: 0 Adding a ConsoleWrite() before the _ArrayAdd() function, I can see the content of $strWMI_QueryResult, and, here it is: QUERY RESULT|# 0|/ Accuracy|32768|[sint32] Availability||[uint16] Caption|Sensore numerico|[string] ConfigManagerErrorCode||[uint32] ConfigManagerUserConfig||[boolean] CreationClassName|Win32_TemperatureProbe|[string] CurrentReading||[sint32] Description|CPU Thermal Probe|[string] DeviceID|root\cimv2 0|[string] ErrorCleared||[boolean] ErrorDescription||[string] InstallDate||[datetime] IsLinear||[boolean] LastErrorCode||[uint32] LowerThresholdCritical||[sint32] LowerThresholdFatal||[sint32] LowerThresholdNonCritical||[sint32] MaxReadable|1270|[sint32] MinReadable|64266|[sint32] Name|Sensore numerico|[string] NominalReading||[sint32] NormalMax||[sint32] NormalMin||[sint32] PNPDeviceID||[string] PowerManagementCapabilities||[uint16] PowerManagementSupported||[boolean] Resolution|1000|[uint32] Status|Unknown|[string] StatusInfo||[uint16] SystemCreationClassName|Win32_ComputerSystem|[string] SystemName|DESKTOP-25LFPVU|[string] Tolerance|32768|[sint32] UpperThresholdCritical||[sint32] UpperThresholdFatal||[sint32] UpperThresholdNonCritical||[sint32]QUERY RESULT|# 1|/ Accuracy|32768|[sint32] Availability||[uint16] Caption|Sensore numerico|[string] ConfigManagerErrorCode||[uint32] ConfigManagerUserConfig||[boolean] CreationClassName|Win32_TemperatureProbe|[string] CurrentReading||[sint32] Description|True Ambient Thermal Probe|[string] DeviceID|root\cimv2 1|[string] ErrorCleared||[boolean] ErrorDescription||[string] InstallDate||[datetime] IsLinear||[boolean] LastErrorCode||[uint32] LowerThresholdCritical||[sint32] LowerThresholdFatal||[sint32] LowerThresholdNonCritical||[sint32] MaxReadable|1270|[sint32] MinReadable|64266|[sint32] Name|Sensore numerico|[string] NominalReading||[sint32] NormalMax||[sint32] NormalMin||[sint32] PNPDeviceID||[string] PowerManagementCapabilities||[uint16] PowerManagementSupported||[boolean] Resolution|1000|[uint32] Status|Unknown|[string] StatusInfo||[uint16] SystemCreationClassName|Win32_ComputerSystem|[string] SystemName|DESKTOP-25LFPVU|[string] Tolerance|32768|[sint32] UpperThresholdCritical||[sint32] UpperThresholdFatal||[sint32] UpperThresholdNonCritical||[sint32]QUERY RESULT|# 2|/ Accuracy|32768|[sint32] Availability||[uint16] Caption|Sensore numerico|[string] ConfigManagerErrorCode||[uint32] ConfigManagerUserConfig||[boolean] CreationClassName|Win32_TemperatureProbe|[string] CurrentReading||[sint32] Description|Memory Module Thermal Probe|[string] DeviceID|root\cimv2 2|[string] ErrorCleared||[boolean] ErrorDescription||[string] InstallDate||[datetime] IsLinear||[boolean] LastErrorCode||[uint32] LowerThresholdCritical||[sint32] LowerThresholdFatal||[sint32] LowerThresholdNonCritical||[sint32] MaxReadable|1270|[sint32] MinReadable|64266|[sint32] Name|Sensore numerico|[string] NominalReading||[sint32] NormalMax||[sint32] NormalMin||[sint32] PNPDeviceID||[string] PowerManagementCapabilities||[uint16] PowerManagementSupported||[boolean] Resolution|1000|[uint32] Status|Unknown|[string] StatusInfo||[uint16] SystemCreationClassName|Win32_ComputerSystem|[string] SystemName|DESKTOP-25LFPVU|[string] Tolerance|32768|[sint32] UpperThresholdCritical||[sint32] UpperThresholdFatal||[sint32] UpperThresholdNonCritical||[sint32]QUERY RESULT|# 3|/ Accuracy|32768|[sint32] Availability||[uint16] Caption|Sensore numerico|[string] ConfigManagerErrorCode||[uint32] ConfigManagerUserConfig||[boolean] CreationClassName|Win32_TemperatureProbe|[string] CurrentReading||[sint32] Description|Video Card Thermal Probe|[string] DeviceID|root\cimv2 3|[string] ErrorCleared||[boolean] ErrorDescription||[string] InstallDate||[datetime] IsLinear||[boolean] LastErrorCode||[uint32] LowerThresholdCritical||[sint32] LowerThresholdFatal||[sint32] LowerThresholdNonCritical||[sint32] MaxReadable|1270|[sint32] MinReadable|64266|[sint32] Name|Sensore numerico|[string] NominalReading||[sint32] NormalMax||[sint32] NormalMin||[sint32] PNPDeviceID||[string] PowerManagementCapabilities||[uint16] PowerManagementSupported||[boolean] Resolution|1000|[uint32] Status|Unknown|[string] StatusInfo||[uint16] SystemCreationClassName|Win32_ComputerSystem|[string] SystemName|DESKTOP-25LFPVU|[string] Tolerance|32768|[sint32] UpperThresholdCritical||[sint32] UpperThresholdFatal||[sint32] UpperThresholdNonCritical||[sint32] Could please anyone help me out? Thanks in advance Francesco
×
×
  • Create New...