Override a default shortcut



  • Hello,

    I've written a script which is for archiving and every time I hit cmd+S out of habit I want that script to run and make a duplicate of my file in another folder. The only thing I don't know is how to map the script to the save shortcut. Is there anyway to make this work?

    Thanks


  • admin

    if you want to receive those notifications, just add this .py file to the start up scripts in your preferences. This doesn't effect performance, unless to your part of the code, what is been executed when the notification is been send, takes a while.



  • Actually Observer method worked pretty well, I used fontDidSave observer. Thanks Fredrik.



  • Thanks Dan and Fredrik,

    Fredrik should the script run every time robofont lunches? does it have effect on performance?


  • admin

    I would advise to subscribe to the notification fontDidSave and create a duplicate whenever that notification is been send.

    There is also a fontWillSave and fontWillAutoSave (in case you want to keep a version each 10 min)

    good luck



  • Hi Bahman,

    You could map the menu item "Save" to another key combination (say, control-s) using System Preferences > Keyboard > Keyboard Shortcuts > Application Shortcuts > RoboFont. Then you could use a script manager like FastScripts to map Cmd-S to your script.

    Works for me, but I'm not using the latest OS.

    D