I am currently working on a school project in which I need to open a video file while using a key press in applescript. I want the program to open the file fullscreen in quicktime player when I press "y" while the program is running.
This is my current code, it works but I don't see how I can include keypresses.
tell application "QuickTime Player"
set testmovie to "Users:Nan:movies:atime.mp4"
activate
open alias testmovie
play document 1
set presenting of document 1 to true
end tell
I hope you guys can help!
You can create a Service in Automator and paste your code within a run applescript action. You can then assign a keystroke to the service in keyboard preferences.