d3d45d90c3965e0a666a43c791aa47f33fb92a95
Substring search for 9 and 19 matched timestamps and unrelated numbers and disconnected all sessions. Match those IDs only when Product or Feature cells equal exactly 19 or 9; keep PTW_* as row substring match. Rebuild distributables. Co-authored-by: Cursor <cursoragent@cursor.com>
PTW Auto-Disconnect
Standalone desktop app that monitors your PTW sessions page and automatically disconnects sessions matching certain product/feature keywords. Runs in a small window without opening Chrome.
Features
- Auto-disconnect — When Monitor is ON, scans the sessions table and clicks Disconnect on rows containing any of the target keywords.
- Logged in — Left panel shows who is logged in, grouped by user, with product/feature per session.
- Activity log — Right panel shows timestamps and disconnect/refresh events.
- Config on startup — On launch, checks
http://localhost:1947/_int_/config.htmland ensures Table Rows per Page is set to 100 (and submits if changed). - Stay awake — While the app is running, prevents Windows from sleeping and the display from turning off.
- One-click run — Double-click Start PTW Auto-Disconnect.vbs (or the built exe) to run without opening a terminal.
Target keywords (disconnect when present)
- PTW_DATAEXCHANGE
- PTW_ARC_FLASH
- PTW_DEVEVAL
- PTW_AFAULT
- PTW_DAPPER
- PTW_COOREVAL
- PTW_CAPTOR
- PTW_IEC_FAULT
- PTW_IEC61363
Modules 19 and 9: Disconnect only when the Product or Feature column equals exactly 19 or 9 (whole cell, not a substring search on the row — searching the full row for 9 or 19 matches dates and other numbers and disconnects everyone).
Requirements
- To run from source: Node.js (LTS) and
npm install. - Sessions server: The app expects the sessions page at
http://localhost:1947/_int_/sessions.html(and config athttp://localhost:1947/_int_/config.html). Start your server first.
Run from source
npm install
npm start
Or double-click Start PTW Auto-Disconnect.vbs (no terminal window).
Build executables
npm run dist
Output in dist:
| Output | Description |
|---|---|
| PTW Auto-Disconnect Setup 2.1.0.exe | Windows installer |
| PTW Auto-Disconnect 2.1.0.exe | Portable single exe (no install) |
| win-unpacked/ | No-install folder; run PTW Auto-Disconnect.exe from inside (avoids ffmpeg path issues on some systems) |
Optional: build and create a zip of the no-install folder:
npm run dist:portable
Then use dist\PTW Auto-Disconnect-no-install.zip — unzip anywhere and run the exe from the extracted folder.
Running on a new PC
- From source: Install Node.js, copy the project, run
npm install, thennpm startor the VBS launcher. - Built exe/installer: Copy the installer or the win-unpacked folder (or the portable exe). No Node.js required.
Behavior summary
- Monitor ON/OFF — Toggle monitoring; when ON, the sessions page is reloaded every 60 seconds and matching rows are disconnected.
- Clear — Clears the activity log display (persisted logs are cleared).
- Config check — On startup the app loads the config page, sets rows per page to 100 if needed, submits, then opens the sessions page. The activity log shows: Config: rows per page already 100 or Config: rows per page set to 100 (or a message if the input was not found).
- The sessions page is loaded in a hidden webview; only the compact GUI (panels + buttons) is visible.
License
See LICENSE.
Description
PTW Auto-Disconnect - compact GUI Electron app
71 MiB
0 Stars
1 Watchers
0 Forks
Languages
JavaScript
77.8%
HTML
21.2%
VBScript
1%