I have the following code inside a python file:
applescript.run('''
tell application "System Events"
-- one second delay
delay 1
-- to press command+shift+g
keystroke "G" using {command down, shift down}
delay 2
-- to enter file path
keystroke "/Users/xxx/Documents/web_images/image_1.jpg"
delay 1
-- hit return twice
keystroke return
delay 1
keystroke return
end tell
''')
It was working great until I installed Monterey, now it's not working anymore. Anyone any idea how to fix it?