NGMemory 1.0.7 provides:
- GUI Automation: Click buttons, set text, interact with ComboBox, CheckBox, etc.
- Memory Access: Read/write process memory, pattern scanning.
- Debugging: Set hardware breakpoints and read registers.
- Screen Analysis: Screenshots, color search, image matching.
- Overlay UI: Create transparent overlays on top of target application windows for interactive UI (labels, buttons, etc.).
Install-Package NGMemory -Version 1.0.7using NGMemory;
using NGMemory.Easy;
using NGMemory.WinInteropTools;Simulate button clicks by control ID.
Click(windowHandle, controlId)ClickAsync(windowHandle, controlId)
Example:
EasyButton.Click(hwnd, 1001);
EasyButton.ClickAsync(hwnd, 1002);CheckBox helpers:
IsChecked(windowHandle, controlId)→ boolSetChecked(windowHandle, controlId, state)ToggleState(windowHandle, controlId)ClickCheckBox(windowHandle, controlId)
Example:
bool on = EasyCheckBox.IsChecked(hwnd, 2001);
EasyCheckBox.ToggleState(hwnd, 2001);ComboBox helpers:
GetSelectedItem(comboHandle)→ string or nullGetItems(comboHandle)→ string[]SelectItemByString(comboHandle, text)SelectItemByIndex(comboHandle, index)
Example:
var items = EasyComboBox.GetItems(combo);
EasyComboBox.SelectItemByString(combo, "Option A");TextBox helpers:
GetText(windowHandle, controlId)→ stringSetText(windowHandle, controlId, text)ClearText(windowHandle, controlId)
Example:
string text = EasyTextBox.GetText(hwnd, 3001);
EasyTextBox.ClearText(hwnd, 3001);Batch operations on multiple controls:
SetTextFields(windowHandle, Dictionary<int,string>)GetTextFields(windowHandle, params int[])→ Dictionary<int,string>SetCheckBoxes(windowHandle, Dictionary<int,bool>)GetCheckBoxes(windowHandle, params int[])→ Dictionary<int,bool>SetComboBoxes(windowHandle, Dictionary<int,string>)GetComboBoxes(windowHandle, params int[])→ Dictionary<int,string>
Example:
var textMap = new Dictionary<int,string>{{3001,"A"},{3002,"B"}};
EasyFormHelper.SetTextFields(hwnd, textMap);Low-level window and control handles:
GetControlHandle(windowHandle, controlId)→ IntPtrGetChildWindows(parentHandle)→ ListGetWindowTitle(hWnd)→ stringSetText(dialogHandle, controlId, text)
Keyboard input:
TypeText(text, delay)/TypeTextAsync(text, delay)SendCtrlC(),SendCtrlV()PressKeys(async, KeyCode...)/PressKeysAsync(KeyCode...)- `PressKeysWithDelay(delay, KeyCode...)
Example:
EasyKeyboard.TypeText("Hello World", 10);
EasyPressKey.PressKeys(false, KeyCode.LCtrl, KeyCode.C);Mouse operations:
MoveTo(x,y)MoveWithHumanMotion(x,y,duration)Click(button),ClickAt(x,y,button)HumanClickAt(x,y,button)DoubleClick(button)- `DragAndDrop(fromX,fromY,toX,toY)
Example:
EasyMouse.HumanClickAt(100,200);Search UI elements by criteria:
FindElement(parent, className?, windowText?, controlId?)→ IntPtrGetWindowRect(hWnd)→ Rectangle
Example:
IntPtr btn = EasyElementFinder.FindElement(mainHwnd, className:"Button", windowText:"OK");Wait for hardware breakpoint and read register:
WaitForRegister(processName or ID, address, Register)→ ulong
Example:
ulong value = EasyDebugHook.WaitForRegister("notepad", addr, Register.Rax);Memory pattern scanning and reading strings:
FindPattern(processName, pattern, startAddr?, endAddr?)→ IntPtrReadString(processName, address, maxLength, encoding?)→ string
Example:
IntPtr addr = EasyMemory.FindPattern("game", "90 90 ?? 90");
string title = EasyMemory.ReadString("game", addr);Screen capture and analysis:
CaptureScreen(),CaptureRegion(x,y,w,h),CaptureWindow(hWnd)FindColor(color, area, tolerance)→ Point?FindAllColorMatches(color, area, tolerance)→ ListCompareImages(img1,img2,samplingRate)→ double%FindImageOnScreen(template, area, minSimilarity)→ Point?
Example:
var matches = EasyScreenAnalysis.FindAllColorMatches(Color.Red, new Rectangle(0,0,50,50));ListView control helpers:
GetItems(handle, columnCount or auto)→ ListGetAllRowsAsStrings(handle, columnCount or auto)→ List<string[]>InsertItem(handle,index,text),RemoveItem(handle,index),ClearAllItems(handle)SetItemText(handle,index,text),SelectItemByName(handle,name)
Example:
var rows = EasySysListView32.GetAllRowsAsStrings(lvHwnd, true);
EasySysListView32.InsertItem(lvHwnd, 0, "New");Waiting utilities:
Until(condition, timeout, interval)→ boolForDuration(ms)RetryUntilSuccess(action, successCheck, attempts, delay)→ bool
Window handling:
Find(processName, partialTitle?)/FindAndFocus(...)→ IntPtrGetMainWindow(processName, partialTitle?),FocusWindow(hWnd)GetAllChildWindows(parent)→ List
Create transparent overlays attached to target application windows, position them, and add UI controls with a fluent API.
• EasyOverlay
- Creates a new overlay for a target window handle (
IntPtr). - Positions: TopLeft, TopRight, BottomLeft, BottomRight, Center.
- Transparent background support, borderless child window of the target.
- Auto-repositions on target window size/move changes.
• OverlayManager
CreateOverlay(hWnd, configure?)→ EasyOverlayCreateOverlayForWindow(processName, titleFilter, configure?)→ EasyOverlay?CreateOverlaysForAllMatching(processName, titleFilter, configure?)→ intStartWindowScan(processName, titleFilter, intervalMs, configure?)→ TimerRemoveOverlay(hWnd)/RemoveAllOverlays()
• OverlayConfiguration (fluent API)
WithSize(width, height)WithPosition(OverlayPosition)andWithOffset(x, y)WithBackgroundColor(color)WithLabel(text, x, y, foreColor?, font?)WithButton(text, x, y, width, height, onClick, backColor?, foreColor?)WithAutoPosition(enabled, intervalMs)WithControl(control)/WithCustomization(action)
OverlayPosition enum: TopLeft, TopRight, BottomLeft, BottomRight, Center.
Quick start (attach one overlay to a found window):
using System;
using System.Diagnostics;
using System.Drawing;
using NGMemory.Easy;
// Find a target window (example: main window of process "twe")
IntPtr hwnd = NGMemory.Easy.EasyWindow.GetMainWindow("twe", ", Auftrag");
if (hwnd != IntPtr.Zero)
{
var mgr = new OverlayManager();
mgr.CreateOverlay(hwnd, overlay =>
{
overlay.Configure()
.WithSize(187, 70)
.WithPosition(OverlayPosition.BottomRight)
.WithOffset(5, 80)
.WithBackgroundColor(Color.Transparent)
.WithLabel("✔ Prüfung OK", 10, 5, Color.Green,
new Font("Segoe UI", 10, FontStyle.Bold))
.WithButton("Öffne Browser", 10, 30, 167, 30,
(s, e) => Process.Start(new ProcessStartInfo("https://example.com")
{ UseShellExecute = true }),
Color.FromArgb(0, 122, 204), Color.White);
});
}Auto-scan and attach overlays to matching windows:
using System;
using System.Drawing;
using NGMemory.Easy;
var manager = new OverlayManager();
// Scans every 1000 ms for windows of process "twe" whose title contains ", Auftrag"
manager.StartWindowScan("twe", ", Auftrag", 1000, overlay =>
{
overlay.Configure()
.WithSize(187, 70)
.WithPosition(OverlayPosition.BottomRight)
.WithOffset(5, 80)
.WithBackgroundColor(Color.Transparent)
.WithLabel("✔ Prüfung OK", 10, 5, Color.Green)
.WithButton("Öffne Browser", 10, 30, 167, 30,
(s, e) => System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo("https://example.com")
{ UseShellExecute = true }),
Color.FromArgb(0, 122, 204), Color.White);
});Example inside a WinForms app (condensed):
public partial class Form1 : Form
{
readonly OverlayManager overlayManager = new OverlayManager();
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
overlayManager.StartWindowScan("twe", ", Auftrag", 1000, ConfigureOverlay);
}
private void ConfigureOverlay(EasyOverlay overlay)
{
overlay.Configure()
.WithSize(187, 70)
.WithPosition(OverlayPosition.BottomRight)
.WithOffset(5, 80)
.WithBackgroundColor(Color.Transparent)
.WithLabel("✔ Prüfung OK", 10, 5, Color.Green,
new Font("Segoe UI", 10, FontStyle.Bold))
.WithButton("Öffne Browser", 10, 30, 167, 30,
(s, e) => Process.Start(new ProcessStartInfo("https://example.com")
{ UseShellExecute = true }),
Color.FromArgb(0, 122, 204), Color.White);
}
}Low-level P/Invoke wrappers for GUI interop.
InteropSetText(dialog, id, text)GetWindowTitle(hWnd)getRef(hWnd, id)→ HandleRefEnumerateProcessWindowHandles(process)→ IEnumerablegetChildList(parent)→ List
CheckBox.IsCheckBoxChecked,SetCheckBoxStateComboBox.GetSelectedItem,GetItems,SetSelectedItem,SetSelectedIndex
Keyboard/mouse via SendInput:
PressKeys,PressKeysWithDelay,CopySelectionMouseMoveTo,MouseClick,MouseDown,MouseUp
Click menu items by path:
ClickMenu(hWnd, async, indices[] )
Read ListView items in another process:
GetListViewItems,ReadListViewItem
Get value of TextBox control:
getTextBoxValue(window, controlId)→ string
Windows API constants, register and MessageBox enums,
DEBUG_EVENT, CONTEXT, MEMORY_BASIC_INFORMATION, SYSTEM_INFO.
All P/Invoke signatures and ShowMessage helper.
Attach to process, set hardware breakpoint, wait for single-step exception, read register.
Scan process memory regions with VirtualQueryEx, search byte patterns with wildcards.
Get base address of a module by name in a process.
General-purpose read/write of any type:
ReadByteArray, ReadStringUnicode/ASCII, ReadInt32, ..., WriteXxx methods.
Example:
var mem = new VAMemory("game");
if(mem.CheckProcess()){
int health = mem.ReadInt32(addr);
mem.WriteInt32(addr, 999);
}// Automate Notepad:
var hwnd = EasyWindow.Find("notepad");
EasyWindow.FocusWindow(hwnd);
EasyKeyboard.TypeText("Automation started...\n");
EasyButton.Click(hwnd, 1);MIT