Skip to content

Instantly share code, notes, and snippets.

@craigpalermo
Last active August 29, 2015 14:03
Show Gist options
  • Save craigpalermo/6b6ec1dde02def871d76 to your computer and use it in GitHub Desktop.
Save craigpalermo/6b6ec1dde02def871d76 to your computer and use it in GitHub Desktop.
As long as it's running, it simulates pressing the F16 key every 5 seconds to trick messaging clients into thinking that you're still active.
import win32api, win32com.client
import time, sys
# open a shell to type into
shell = win32com.client.Dispatch("WScript.Shell")
while True:
# just some dots to show that it's still running
sys.stdout.write('.')
sys.stdout.flush()
# press a key
shell.SendKeys("{F16}")
# be patient, let laziness flow through you
time.sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment