How to use a shortcut to run an applescript?

Joined
Jan 17, 2015
Messages
12
Reaction score
0
Points
1
Is there any way inside of applescript to do this?

i've tried using automator to do t but it doesn't work, if i use services and use a non conflicting shortcut to open the services, it works for 30 seconds then after that whenever i try to use it it just makes the top bar flash blue for half a second and say that its been run, but not actually run it, same if i go to (application)>services>Myservice and run it, nothing happens, but when i run it inside of automator, it works perfectly fine.

I've also tried using it as an applications and using a shortcut, but it doesn't do anything, and when i try to manually open the application it says it can't be opened with error -1712.

So, my last resort would be if theres something in applescript like "if keystroke (shortcut here) then (stuff here)" or something like that works
 
Joined
Aug 13, 2011
Messages
200
Reaction score
7
Points
18
Location
West Sussex
I don't fully understand your question, but you can not recieve keystroke events with vanilla AppleScript, you can only send Keystrokes using System Events.

Cant you use the Keyboard Shortcut facilities in System Preferences?

Regards Mark
 
OP
N
Joined
Jan 17, 2015
Messages
12
Reaction score
0
Points
1
I don't fully understand your question, but you can not recieve keystroke events with vanilla AppleScript, you can only send Keystrokes using System Events.

Cant you use the Keyboard Shortcut facilities in System Preferences?

Regards Mark

I was trying to use a shortcut to run a specific applescript application or script, and the keyboard shortcut facilities in system preferences don't seem to work, the service/application works fine, but when i press the shortcut, nothing happens.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top