Back to Discover

#windows automation

1 prompt found

AutoHotkey v2 Script Writer for Office Staff: Hotstrings with Safe Trigger Prefixes, App Specific Hotkeys with #HotIf, Clipboard Macros, Date Math, and a v1 Syntax Check
⚡ Productivity

AutoHotkey v2 Script Writer for Office Staff: Hotstrings with Safe Trigger Prefixes, App Specific Hotkeys with #HotIf, Clipboard Macros, Date Math, and a v1 Syntax Check

Ppromptstudio·Oct 6, 2026
No rating

Write a working AutoHotkey v2 script for a Windows office worker who types the same blocks all day: a trigger naming scheme that never fires by accident, hotstrings for signatures and dates, app specific hotkeys scoped with #HotIf, clipboard macros that restore what you had copied, a shortcut conflict check, a v1 to v2 syntax check, install and startup steps, and a test plan.

Act as an AutoHotkey v2 developer who writes small, readable automation scripts for office staff on Windows, and who knows that most broken scripts online are v1 syntax pasted into v2. Inputs: - The person's role and the apps they type in, with process names if known (WINWORD.EXE, OUTLOOK.EXE): [AppsUsed] - Text blocks they retype often (signatures, disclaimers, addresses, standard replies): [TextBlocks] - Date or number formats they type (today, a deadline 14 days out, invoice numbers): [DateNeeds] - Repeated multi step actions in a specific app: [AppActions] - Tasks that start from selected or copied text: [ClipboardTasks] - Shortcuts they already rely on in those apps: [ExistingShortcuts] - Output format: [Format] Generate: 1. A trigger plan: a prefix such as ] for every hotstring so normal typing never expands, a name for each item in TextBlocks and DateNeeds, and the hotstring options used (* for no ending character). 2. A conflict check: every proposed hotkey against ExistingShortcuts and common app defaults, with a replacement for any clash. 3. One complete v2 script starting with #Requires AutoHotkey v2.0 and #SingleInstance Force, grouped into labeled sections: global hotstrings, date hotstrings using FormatTime and DateAdd, app specific hotkeys for AppActions inside #HotIf WinActive("ahk_exe ...") blocks closed with #HotIf, and clipboard macros for ClipboardTasks. 4. Clipboard macros that save ClipboardAll(), clear A_Clipboard, send Ctrl+C, wait with ClipWait, act on the text, then restore the saved clipboard, with a message when nothing was selected. 5. A v1 syntax check listing what would break if pasted from an old forum post: commas after commands, %var% in expressions, Clipboard instead of A_Clipboard, #IfWinActive, and return ended hotkeys instead of braces. 6. Install and startup steps: install AutoHotkey v2, save the file as UTF-8 with an .ahk extension, run it, and put a shortcut in the shell:startup folder. 7. A test plan: each trigger, where to test it, and the expected result. Constraints: - Use SendText for literal text so symbols are not read as modifier keys. - Never store passwords, client data, or login sequences in the script. - Tell the user to confirm with their IT team before installing on a managed work computer. No em dashes.