Listing Keyboard Shortcuts - Thanks
  • I forgot to thank you Daniel for exposing the keyboard shortcuts in version 2.3.1.1; exactly what I had asked for. I use this:

    tell application \"FastScripts\"
    set s to script items where has keyboard shortcut is true
    set SL to {}
    repeat with k from 1 to count s
    if k < 10 then
    set m to \"0\" & k
    else
    set m to k as rich text
    end if
    tell item k of s to set SL's end to (m ¬
    & \" \" & name & ¬
    \".......\" & shortcut string of keyboard shortcut)
    end repeat
    set C to choose from list SL
    if C is not false then
    set SF to script file of item ¬
    ((rich text 1 thru 2 of (C as string)) ¬
    as string as number) of s
    else
    return
    end if
    end tell
    run script alias SF
  • Glad to hear it's working! And thanks for reminding me about that feature - I had almost forgotten I added it :)
  • Is it possible to write the shortcuts as well as read them?

    I'm thinking of a setup where we distribute updated scripts to users: it would be good to be able to label each script with the shortcut we want it to have and have that shortcut applied to the script(s) when the user logs in.

    Alternatively, is it possible to write the shortcuts to FastScripts' plist file?
  • Nick: unfortunately this is not possible right now. I have been thinking of a kind of "script archive" format that would include scripts along with their shortcuts (along with other settings).

    One of the obstacles is that setting a shortcut is very much a user-centric action, in that it depends heavily on what other shortcuts they've setup in other apps or in the system. So for instance a programatically or configuration-based hotkey set might not work as specified.

    Still, I see the value in such an arrangement so I'm hoping to implement something along those lines.

    Daniel
  • This would be an easier task, Daniel, if two-key hotkeys were possible (a la CopyPaste, for example, where clip set entries are numbered and executed like this: command v [number] release command. This pastes the contents of that entry in the active key set to the insertion point in the frontmost document).

    You might use command-F and any second key while command is still down, with action following the release of the command key, and get away with the command-F part because most hot keys execute on key up.
  • Nova: That would definitely be quite an enhancement. I will put it on the list of possible features, but there are other things that will probably take higher prioriority for at least several months.
  • So, is it OK to push out those plists to client machines?

    (And I'd love to see two key shortcuts implemented too — being able to hold down a couple of modifiers and then hit a mnemonic sequence of letters would be my favourite.)
  • nickpassmore: Yes - the preference plists should be pushable to another user, provided the scripts are present at the same respective location on the client's machine.

    I agree that this is not ideal, and I hope to improve this. In particularly, it means that every time you update a user's preferences, you'll be obliterating any private preferences they may have set themselves (though for your purposes perhaps a standardized user experience is more appropriate).

    Daniel
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!