Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto Continue After Reset

Automatically resume your AI coding workflow after a usage-limit reset.

You start a long task. The usage limit hits. The limit will reset at 8 PM — but you have to be sitting at the computer at 8 PM to click the input box and type "continue".

This tool does that for you.

✅ Windows (PowerShell, no dependencies) ✅ macOS (AppleScript, native) ✅ Custom time and custom message ✅ Restores your clipboard when done ✅ Keeps the machine awake while waiting ✅ MIT licensed, ~150 lines you can read in full

It does not bypass anything. No limit circumvention, no authentication tricks, no CAPTCHA solving, no API abuse. It waits for the reset time you enter and then performs one ordinary click-paste-Enter at the coordinates you pointed at.


Quick start

Windows

powershell.exe -ExecutionPolicy Bypass -File ".\windows\auto-continue.ps1" `
  -TargetTime "20:10:05" `
  -Message "Continue and only stop when everything is finished."

macOS

chmod +x ./macos/auto-continue.sh

./macos/auto-continue.sh \
  --time "20:10:05" \
  --message "Continue and only stop when everything is finished."

Both scripts then walk you through three steps:

  1. Keep the target application open and visible.
  2. Put your mouse pointer over its text input field.
  3. Come back to the terminal and press Enter.

That last Enter captures the cursor coordinates. The script prints the scheduled time and waits. When the clock hits it, it moves the mouse back to that exact point, clicks, pastes your message, and presses Enter.

Run with no arguments to use the defaults:

Time:    20:10:05
Message: Continue and do not stop until the task is fully completed.

If the time you enter has already passed today, it schedules for tomorrow automatically.


Options

Windows macOS Default Meaning
-TargetTime --time 20:10:05 Local time in 24-hour HH:MM:SS
-Message --message Continue and do not stop until the task is fully completed. Text to type into the field
--help Usage summary

How it works

Step Windows macOS
Read cursor position GetCursorPos (user32) CGEvent via Swift
Stay awake SetThreadExecutionState caffeinate -dimsu
Click mouse_event (user32) System Eventsclick at
Type Clipboard + Ctrl+V Clipboard + Cmd+V
Submit {ENTER} key code 36

The message goes through the clipboard so punctuation, quotes, accents, and emoji arrive intact — keystroke synthesis mangles them. Your previous clipboard contents are saved and restored afterward.

The wait loop tightens as the deadline approaches (1s → 100ms → 10ms polls), so it fires within a few milliseconds of the target without burning CPU for hours.


Requirements

Windows — nothing to install. PowerShell 5.1+ (ships with Windows 10/11).

macOS — Swift, included with Apple's command-line developer tools:

xcode-select --install

On first run, macOS will ask for Accessibility permission. Allow your terminal app under:

System Settings → Privacy & Security → Accessibility

Terminal may also ask for permission to control System Events. Both are required for any tool that clicks on your behalf.


Limitations

Read these before you leave it running overnight:

  • The computer must stay powered on and unlocked. The scripts prevent sleep, but not a lock screen.
  • The target window must stay visible and in the same position. Move or resize it and the coordinates point somewhere else.
  • Changing display scaling or unplugging a monitor invalidates the captured position.
  • The script clicks whatever is at those coordinates — it has no idea what your screen looks like. Verify the position carefully.

Roadmap

Contributions welcome — two of these are tagged good first issue.

  • #1 Enter screen coordinates manually instead of capturing them
  • #2 Retry when the click or paste does not land
  • #3 Multiple scheduled messages
  • #4 Linux support (X11 / Wayland)
  • #5 Simple graphical interface
  • #6 Run minimized in the system tray
  • #7 Detect that the input field is ready instead of trusting the clock

Contributing

Issues and pull requests are welcome. If something broke on your setup, please include your OS version, the exact command you ran, and what the script printed before it failed.

License

MIT. See LICENSE.

About

Automatically resume AI coding agents and desktop workflows after usage-limit resets on Windows and macOS.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages