![]() ![]() The keyboard shortcut you enter here is the one you can use to trigger your "force close" behavior. Create a new shortcut, where the "Menu Title" is the title you gave your Service (again, you can tie this shortcut just to the applications to which your Service applies).Open System Preferences > Keyboard > Shortcuts.Add a "Run AppleScript" block in which you write your AppleScript.Open Automator (Applications > Utilities > Automator) and create a new Service (optionally, configure it just to run in the applications you want).To tie an AppleScript to a keyboard shortcut: Such an AppleScript might look something like this (though be warned, triggering Command- delete without knowing the context is an easy way to accidentally delete files and large swathes of text): tell application "System Events" You would have to tailor this behavior to the specific applications in which you're interested. However, the dialog shortcuts vary by application-older versions of Microsoft Word don't comply with the Command- delete behavior (they use Command- D), while Automator's save sheets can often only be closed through mouse input. The first key combination would likely be Command- W (though not even this is entirely universal). ![]() To force-close a window, you'd need to automate the correct series of key presses using AppleScript or something similar. The exception to this rule is if the action you wish to activate will delete a file or changes thereto, in which case the shortcut is Command- delete. To press a button in a dialog using a keyboard shortcut, press Command, followed by the first letter of the action you wish to trigger. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |