Sign in to follow this  
Followers 0
Unc3nZureD

Unknown Error with ProcessGetStats()

2 posts in this topic

I wrote the following little snippet:

#RequireAdmin
#include <Array.au3>

$l = ProcessList()
ReDim $l[$l[0][0] + 1][3]

$f = ProcessGetStats("scite.exe")
If IsArray($f) Then
    MsgBox(0,"", "This one works!")
    _ArrayDisplay($f)
EndIf

For $i = 3 To $l[0][0]
    MsgBox(0,"", "'" & $l[$i][0] & "' - " & $i & " - " & $l[0][0])

    $m = ProcessGetStats($l[$i][0])
    If IsArray($m) Then
        $l[$i][3] = $m[0]
        MsgBox(0, "Success", "This is an array! Congratz")
    Else
        MsgBox(0, "Error", "It is not an array.")
    EndIf
Next

When I'm trying to get Process' Stats from a simple string as in the example: "scite.exe" it works perfectly. After that I'm Trying to loop thru the process List I'm gtting tons of errors.

First: It fails all the time

Second: It crashes after the 34th process (for me)

I can't really see what did I miss, but I'm sure I made a huge mistake somewhere :D

Share this post


Link to post
Share on other sites



I guess >this is what needs to be done.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0