Skip to content

PowerShell Toolkit Reference

Complete reference for skippy-tools.ps1 - Skippy's autonomous capabilities.


Loading the Module

Import-Module C:\Users\ejb71\SkippyBuddy\tools\skippy-tools.ps1

Screenshot Functions

Take-Screenshot

Capture the screen and save to file.

Take-Screenshot [-Scale <Double>] [-Path <String>] [-AllMonitors] [-Monitor <String>]

Parameters:

Parameter Type Required Default Description
-Scale Double No 0.4-0.5 Scale factor (0.1 to 1.0)
-Path String No temp/screenshot_*.png Output path
-AllMonitors Switch No False Capture all monitors
-Monitor String No (primary) Left, Right, Primary, Secondary, 1, 2

Returns: PSCustomObject

Path        : C:\Users\ejb71\SkippyBuddy\temp\screenshot_20260131_143022.png
LatestPath  : C:\Users\ejb71\SkippyBuddy\temp\latest_screenshot.png
Size        : 245 KB
Resolution  : 1024x576
Timestamp   : 2026-01-31 14:30:22

Examples:

# Basic screenshot
Take-Screenshot

# Custom scale
Take-Screenshot -Scale 0.5

# All monitors
Take-Screenshot -AllMonitors -Scale 0.3

# Specific monitor
Take-Screenshot -Monitor Left
Take-Screenshot -Monitor Right -Scale 0.6

Take-ScreenshotAllMonitors

Capture the entire virtual screen (all monitors combined).

Take-ScreenshotAllMonitors [-Scale <Double>] [-Path <String>]

Parameters:

Parameter Type Required Default
-Scale Double No 0.4
-Path String No temp/screenshot_all_*.png

Returns: PSCustomObject with additional fields:

SizeMB               : 0.45
OriginalResolution   : 5120x1440
ScaledResolution     : 2048x576
VirtualScreenOrigin  : (-2560, 0)
Warning              : (if > 2MB)

Take-ScreenshotMonitor

Capture a specific monitor by name or number.

Take-ScreenshotMonitor -Monitor <String> [-Scale <Double>] [-Path <String>]

Parameters:

Parameter Type Required Default
-Monitor String Yes -
-Scale Double No 0.5
-Path String No temp/screenshot_{monitor}_*.png

Monitor Values:

  • Left, Secondary, 2 → Left monitor
  • Right, Primary, 1 → Right monitor

Get-ScreenInfo

Get information about connected displays.

Get-ScreenInfo

Returns: Array of PSCustomObject

DeviceName    Primary Resolution  WorkingArea
----------    ------- ----------  -----------
\\.\DISPLAY2  False   2560x1440   2560x1400
\\.\DISPLAY1  True    2560x1440   2560x1400

Get-MonitorInfo

Get detailed monitor information including positions.

Get-MonitorInfo

Returns: PSCustomObject

VirtualScreen : @{Position=(-2560, 0); Size=5120x1440; Left=-2560; ...}
MonitorCount  : 2
Monitors      : Array of monitor objects with positions

Application Management

Get-RunningApps

Get list of running applications with visible windows.

Get-RunningApps

Returns: Array sorted by memory usage

Id     ProcessName   MainWindowTitle         Memory
--     -----------   ---------------         ------
12345  chrome        Google Chrome           1024.5
23456  Code          skippy.py - VS Code     512.3

Start-App

Start an application.

Start-App -Name <String> [-Arguments <String>] [-Wait]

Parameters:

Parameter Type Required Description
-Name String Yes App name or path
-Arguments String No Command line arguments
-Wait Switch No Wait 2s for app to start

Examples:

Start-App -Name "notepad"
Start-App -Name "code" -Arguments "C:\project"
Start-App -Name "C:\Program Files\App\app.exe" -Wait

Stop-App

Stop an application by name or PID.

Stop-App [-Name <String>] [-Id <Int>] [-Force]

Parameters:

Parameter Type Required Description
-Name String No* Process name (without .exe)
-Id Int No* Process ID
-Force Switch No Force kill without graceful shutdown

*One of -Name or -Id required.

Examples:

Stop-App -Name "notepad"
Stop-App -Id 12345 -Force

Focus-App

Bring an application window to foreground.

Focus-App -Name <String>

Returns:

ProcessName  : notepad
WindowTitle  : Untitled - Notepad
Status       : Focused

System Status

Get-SystemStatus

Get overall system status.

Get-SystemStatus

Returns:

Timestamp     : 2026-01-31 14:30:22
CPU           : 15%
Memory        : 8.2 GB / 16.0 GB (51%)
DiskC         : 234.5 GB free / 500.0 GB
Uptime        : 2d 14h 32m
Battery       : N/A (Desktop)
ActiveWindows : 12

Get-NetworkStatus

Get network connectivity status.

Get-NetworkStatus

Returns:

Internet : Connected
Latency  : 23ms
Adapters : Array of active network adapters

Notifications

Send-Notification

Show a Windows toast notification.

Send-Notification [-Title <String>] -Message <String> [-Icon <String>]

Parameters:

Parameter Type Required Default Values
-Title String No "Skippy" -
-Message String Yes - -
-Icon String No "Info" Info, Warning, Error

Example:

Send-Notification -Title "Alert" -Message "Task complete!" -Icon "Info"

Skippy Management

Get-SkippyStatus

Check if Skippy desktop app is running.

Get-SkippyStatus

Returns:

Running    : True
ProcessId  : 12345
Memory     : 125.3 MB
LastLog    : [14:30:22.123] _on_text_done: received 256 chars

Restart-Skippy

Restart the Skippy desktop app.

Restart-Skippy

Actions:

  1. Kills any existing pythonw process
  2. Starts Skippy with pythonw
  3. Returns new status

Clipboard

Get-ClipboardContent

Get current clipboard contents.

Get-ClipboardContent

Returns:

HasText     : True
TextLength  : 256
TextPreview : First 200 characters of clipboard...
HasImage    : False

Set-ClipboardText

Set clipboard text content.

Set-ClipboardText -Text <String>

Returns:

Status : Set
Length : 42

Configuration Variables

The module defines these variables:

Variable Value
$Script:SkippyRoot C:\Users\ejb71\SkippyBuddy
$Script:TempDir C:\Users\ejb71\SkippyBuddy\temp
$Script:LogDir C:\Users\ejb71\SkippyBuddy\logs

Error Handling

Most functions return PSCustomObject with Status field on error:

$result = Focus-App -Name "nonexistent"
if ($result.Status -eq "NotFound") {
    Write-Host $result.Message
}

Usage Tips

Chaining Commands

# Take screenshot, check status, notify
$screenshot = Take-Screenshot -AllMonitors
$status = Get-SystemStatus
Send-Notification -Message "Screenshot saved to $($screenshot.Path)"

Conditional Execution

# Only act if app is running
if ((Get-RunningApps | Where-Object ProcessName -eq "notepad")) {
    Focus-App -Name "notepad"
}

Background Tasks

# Monitor system in background
Start-Job {
    while ($true) {
        $status = Get-SystemStatus
        if ([int]$status.CPU.Replace('%','') -gt 80) {
            Send-Notification -Message "High CPU: $($status.CPU)" -Icon Warning
        }
        Start-Sleep 60
    }
}