Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import accessible_output2.outputs.auto
- import winsound
- import keyboard
- import time
- import os
- def path_file(file_name):
- if getattr(sys, 'frozen', False):
- return os.path.join(sys._MEIPASS, file_name)
- else:
- return file_name
- def exit():
- speak.output(str(count))
- sys.exit(0)
- def reset_seconds(*args, **kwargs):
- global seconds
- seconds = 0
- count = 0
- seconds=0
- speak = accessible_output2.outputs.auto.Auto()
- keyboard.add_hotkey("ctrl+shift+/", exit)
- keyboard.on_press(reset_seconds)
- while True:
- time.sleep(1)
- seconds+=1
- if seconds % 300 == 0:
- count += 1
- winsound.PlaySound(path_file("snd"), winsound.SND_FILENAME)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement