Jump to content

Recommended Posts

Posted (edited)

Hi, having an issue with an application i did, seems to crash randomly, and can take hours to do so.

Simply says in the error msgbox:

AutoIt Error

Line 16392 (whatevermyapppath.exe)

Error: The requested action with this object has failed.

 

Recent changes to the script include this:
 

ObjGet("winmgmts:\\localhost\root\CIMV2")

$oSelect_active_network_cards = $objWMIService.ExecQuery('SELECT ProductName FROM Win32_NetworkAdapter WHERE NetConnectionStatus = 2 OR NetConnectionStatus = 9', "WQL")
For $oSelect_active_network_card In $oSelect_active_network_cards
    $Adapter = $oSelect_active_network_card.ProductName
Next

Is the only thing i can see that can be related to an "object"

This lines run only once at the top of the script.

When i run the script itself and wait for a crash, it doesn't, or at least yet i didn't.

What do you think this error could be?

UPDATE: Runing the script eventually output this:

"C:\script.au3" (894) : ==> The requested action with this object has failed.:
$oNetwork_cards = $objWMIService.ExecQuery('SELECT BytesReceivedPerSec, BytesSentPerSec FROM Win32_PerfFormattedData_Tcpip_NetworkInterface WHERE name LIKE "' & $Adapter & '"', "WQL")
$oNetwork_cards = $objWMIService^ ERROR

Edited by careca
  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

Hi, updated the post to include the line where it failed:

This line runs every 2 seconds or so.


$oNetwork_cards = $objWMIService.ExecQuery('SELECT BytesReceivedPerSec, BytesSentPerSec FROM Win32_PerfFormattedData_Tcpip_NetworkInterface WHERE name LIKE "' & $Adapter & '"', "WQL")
$oNetwork_cards = $objWMIService^ ERROR

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

Nop, but now im considering using a different method to retrieve these values, and scrap this one.

wmic path Win32_PerfRawData_Tcpip_NetworkInterface Get BytesReceivedPersec,BytesSentPersec

Thanks for the help.

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

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
×
×
  • Create New...