Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. import time
  2.  
  3. # Retrieve current or set initial value.
  4. try:
  5. # Toggle the value if it already exists. True <-> False
  6. store.set_global_value("helloRepeat",not store.get_global_value("helloRepeat"))
  7. except:
  8. # Value did not exist, set it True now.
  9. store.set_global_value("helloRepeat",True)
  10.  
  11. # Loop de loop.
  12. # This will not execute on toggle-off key-press.
  13. # Existing loop from previous key-press will terminate.
  14. while store.get_global_value("helloRepeat"):
  15. # Set chat and channel trigger/characters appropriately.
  16. keyboard.send_keys('<enter>Hello!<enter>')
  17. # Sleep for seconds..
  18. time.sleep(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement