| Crates.io | startt |
| lib.rs | startt |
| version | 0.1.19 |
| created_at | 2025-05-08 01:06:32.137695+00 |
| updated_at | 2025-06-09 02:04:47.76598+00 |
| description | Automate detection of HWND and real PID for apps launched through ShellExecuteEx (cmd start, Explorer, PowerShell) |
| homepage | https://github.com/davehorner/startt |
| repository | https://github.com/davehorner/startt |
| max_upload_size | |
| id | 1664726 |
| size | 391,008 |
feat(startt): hello 'startt' default open tool
startt solves a long-standing Windows poor design/quirk: when you do
• cmd.exe /c start …
• Explorer “Open with” or protocol handler
• PowerShell Start-Process
or anything that calls ShellExecuteEx under the covers (even with SEE_MASK_NOCLOSEPROCESS + WaitForInputIdle), the PID you get back is unusable for apps like Chrome. You can’t reliably find its window handle (HWND) or true process ID for automation, testing, or demos.
Usage:
startt [options] <executable|document|URL> [args...]
Grid and cell assignment options:
-g ROWSxCOLS[ mMONITOR] or --grid ROWSxCOLS[ mMONITOR]-g 2x2m1 for a 2x2 grid on monitor 1, zero-based).-fg or --fit-grid-apc ROWxCOL[ mMONITOR] or --assign-parent-cell ROWxCOL[ mMONITOR]-apc 1x1m1). If monitor is omitted, uses the grid's monitor.-rpc or --reserve-parent-cell--assign-parent-cell).Taskbar options:
-htb or --hide-taskbar-stb or --show-taskbarOther options:
-f or --follow-F or --follow-forever--find-oldest-t SECONDS or --timeout SECONDS-hT or --hide-title-bar-hB or --hide-border-T or --flash-topmost-sd MILLISECONDS or --shake-duration MILLISECONDS-dbg or --debug-chromedebugchrome:// prefix for debugchrome-cdp-rs support.--gui--num-recent COUNTExamples:
startt -f -g2x2m1 -fg -apc 1x1m1 -rpc myapp.exe
This will assign the parent window to cell (1,1) on monitor 1, ensure no child window is placed in that cell, and resize all windows to fit their grid cells.
startt -f -g1x4 -fg -t 10 -hT -T -sd 1500 cargo-e --run-all --run-at-a-time 4
This will shake and grid each window, resize them to fit their grid cells, hide the title bar, briefly flash the window as topmost, and use a 1.5 second shake duration. After 10 seconds, a quit message is sent to each window.

Works with commands that are detached as demonstrated by cmd.exe start:
startt -f -g1x5 cmd /c "start \"parent\" cmd /k echo parent & start \"1\" cmd /k echo 1 & start \"2\" cmd /k echo 2 & start \"3\" cmd /k echo 3 & start \"4\" cmd /k echo 4"
Or use with PowerShell:
startt -f -g1x5 powershell -NoProfile -WindowStyle Normal -Command "1..5 | ForEach-Object { Start-Process powershell -ArgumentList '-NoProfile','-Command','$host.ui.RawUI.WindowTitle = \"Prompt $_ PID=\" + $PID; Write-Host Prompt $_ PID=$PID; Start-Sleep -Seconds 99999' }; Start-Sleep -Seconds 99999"
When grid mode is enabled, each window (parent or child) is moved to the next cell in the grid, wrapping around as needed. With --fit-grid, each window is also resized to fill its cell. This works for both the initial window and any new windows found in follow mode.
cargo-e provides a graphical panic window;

See also:
startt solves the problem of finding the hwnd and process id of a command or url that is launched by cmd.exe /c start, explorer
still rough around the edges and not intended for any purpose but demonstration. the lib interface is subject to change - SEMVER rules will be applied.
it shakes the 1st found window; moves windows in grids; kills all child processes on ctrl+c;
tested with chrome, vscode, mpv, msedge, cmd. Your application, mileage, and use case may vary. If you find a problem; take a look at the code, PRs and polite discussion are welcome.
--dave horner
5/25
MIT License
Copyright (c) 2025 David Horner
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.