Jump to content
Sign in to follow this  
FranklinZero

Conditional running even when doesnt match

Recommended Posts

FranklinZero

#include <_ProcessListProperties.au3>

Func NWMemoryUKiller ()
    $nwPLP = _ProcessListProperties ("GameClient.exe")
    $nwPnum = 1 ;Define 1 como número base do processo atual

    While $nwPnum <= $nwPLP[0][0]
        if $nwPLP[0][0] >= $nwPnum Then

            If $nwPLP[$nwPnum][7] > 1328196 Then
                Do
                    ProcessClose ($nwPLP[$nwPnum][1])
                Until Not ProcessExists ($nwPLP[$nwPnum][1])
            EndIf

        EndIf

        $nwPnum = $nwPnum + 1
        Sleep (100)
    WEnd
EndFunc

While ProcessExists ("FullyAutoToD.exe")
    NWMemoryUKiller ()
    Sleep (100)
WEnd

That code is running the "ProcessClose ($nwPLP[$nwPnum][1])" even when "If $nwPLP[$nwPnum][7] > 1328196 Then" doesnt match. Can anyone help me?

Share this post


Link to post
Share on other sites
FranklinZero

Hes closing the process even when the process wont get memory over the amount, in this case 1,26 GB

Share this post


Link to post
Share on other sites
FranklinZero

1328196 / 1024 / 1024 = 1,266666412353516 GB

The code is if the process reach that memory used then kill him.

Share this post


Link to post
Share on other sites
Melba23

FranklinZero,

You have been a member here for over 3 years - and yet it seems that you still have not realised that there are some Forum rules (there is also a link at bottom right of each page) that we ask posters to respect. Among them is the following:

 

Do not ask for help with AutoIt scripts, post links to, or start discussion topics on the following subjects:

[...]

Launching, automation or script interaction with games or game servers, regardless of the game

so posting a script containing the line:

$nwPLP = _ProcessListProperties ("GameClient.exe")
is not really a very good idea. Please go and read the rules carefully before you post again. :naughty:

JohnOne,

 

Show this function "$nwPLP = _ProcessListProperties ("GameClient.exe")"

A visit to the opticians might be good idea. ;)

M23

  • Like 1

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×