-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmacro.py
More file actions
30 lines (22 loc) · 924 Bytes
/
Copy pathmacro.py
File metadata and controls
30 lines (22 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import sys
import keyboard
import pygetwindow
os = sys.platform
if os == 'darwin':
windows_open = pygetwindow.getAllTitles()
if 'Stardew Valley ' in windows_open:
while True:
event = keyboard.read_event()
if event.event_type == keyboard.KEY_DOWN and event.name == 'space':
keyboard.send('right_shift+r+del')
if event.event_type == keyboard.KEY_DOWN and event.name == 'delete':
keyboard.send('space')
if os == ('win32'):
windows_open = pygetwindow.getAllTitles()
if 'SMAPI ' or 'Stardew Valley' in windows_open:
while True:
event = keyboard.read_event()
if event.event_type == keyboard.KEY_DOWN and event.name == 'space':
keyboard.send('right_shift+r+del')
if event.event_type == keyboard.KEY_DOWN and event.name == 'delete':
keyboard.send('space')