Skip to content

Instantly share code, notes, and snippets.

@JFFail
Created February 10, 2016 20:41
Show Gist options
  • Save JFFail/4ff52297499ec130fcc2 to your computer and use it in GitHub Desktop.
Save JFFail/4ff52297499ec130fcc2 to your computer and use it in GitHub Desktop.
VBScript for the laziest possible way to continuously re-run your last command in a shell.
Option Explicit
Dim objShell
set objShell = CreateObject("WScript.Shell")
While true
objShell.AppActivate("powershell")
objShell.SendKeys "{Up}"
WScript.Sleep 200
objShell.SendKeys "{Enter}"
WScript.Sleep 5000
Wend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment