Process Info


Node Information
Gets process information, use running processes, loop through them using For Each Loop and get information about each process.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Process IN Process ONE FALSE FALSE
Name OUT String MULTIPLE FALSE FALSE
MainWindowTitle OUT String MULTIPLE FALSE FALSE
ID OUT Int32 MULTIPLE FALSE FALSE
Priority OUT Int32 MULTIPLE FALSE FALSE
PagedMemorySize OUT Int64 MULTIPLE FALSE FALSE
IsResponding OUT Boolean MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.Win32.Processes
{
    [IsNode("Process Info")]
    public class GetProcessInfo : Node
    {
        Port procObject = new Port(PortType.IN, typeof(System.Diagnostics.Process), AcceptsLinks.ONE, "Process");
        Port processName = new Port(PortType.OUT, typeof(string), AcceptsLinks.MULTIPLE, "Name");
        Port mainwindowTitle = new Port(PortType.OUT, typeof(string), AcceptsLinks.MULTIPLE, "MainWindowTitle");
        Port procID = new Port(PortType.OUT, typeof(int), AcceptsLinks.MULTIPLE, "ID");
        Port basepriority = new Port(PortType.OUT, typeof(int), AcceptsLinks.MULTIPLE, "Priority");
        Port pagedmemory = new Port(PortType.OUT, typeof(long), AcceptsLinks.MULTIPLE, "PagedMemorySize");
        Port isresponding = new Port(PortType.OUT, typeof(bool), AcceptsLinks.MULTIPLE, "IsResponding");
        public GetProcessInfo()
        {
            Name = "Process Info";
            AddPort(procObject);
            AddPort(processName);
            AddPort(mainwindowTitle);
            AddPort(procID);
            AddPort(basepriority);
            AddPort(pagedmemory);
            AddPort(isresponding);
            mainwindowTitle.Instructions = "init";
            procID.Instructions = "init";
            processName.Instructions = "init";
            pagedmemory.Instructions = "init";
            basepriority.Instructions = "init";
            isresponding.Instructions = "init";
            Information = "Gets process information, use running processes, loop through them 
        }
        public override void UpdateResults()
        {
            string o = GetValue(procObject);
            mainwindowTitle.Instructions = "((System.Diagnostics.Process)" + o + ").MainWindowTitle";
            procID.Instructions = "((System.Diagnostics.Process)" + o + ").Id";
            processName.Instructions = "((System.Diagnostics.Process)" + o + ").ProcessName";
            pagedmemory.Instructions = "((System.Diagnostics.Process)" + o + ").PagedMemorySize64";
            basepriority.Instructions = "((System.Diagnostics.Process)" + o + ").BasePriority";
            isresponding.Instructions = "((System.Diagnostics.Process)" + o + ").Responding";
        }
    }
}