Launchbar copying multiple12/12/2023 Dropped support for Chromium and Opera web browsers.Changed keyboard shortcut of “Open in Action Editor” from Command-Return to Shift-Command-E.Fixed a layout issue in the Options pane of the index window.Fixed incorrect display of icons with non-square aspect ratios.Fixed built-in “Set Desktop Background” action.Fixed indexing of Firefox bookmarks and history.Improved browsing of an application’s recent documents to indicate if a document would by default open with a different app.Improved appearance of drag & drop highlight while dragging items onto the LaunchBar window.Renamed image conversion actions from “Recompress Image” to “Convert Image to JPG”.Improved application indexing to also include Xcode’s Simulator.app.Improved Google Chrome Bookmarks and History indexing to support multiple profiles.New built-in actions for converting images into PNG or HEIC format.New built-in “Dark Mode On/Off” action.Note that the text conversion action can be anything you want that returns some text, e.g. Type an abbreviation for the text conversion option you want, e.g. Hold ⌘Space or use your shortcut for Instant Send (I use a single Option tap) Whenever you have a text item selected in LaunchBar, you can press ⇧↩ to paste that text in the frontmost application.Įven better, if you have a text item selected and send that to a text processing action (by using Instant Send as you suggested or Send To by pressing ⇥), that ⇧↩ executes that action first, then pastes the result in the frontmost application. In addition to what Nigel wrote before, there’s another way you could speed this up. Thanks to Nigel to point out Instant Send and the other tips! (newPBItem's setData:theData forType:aType)įirst off: I’m one of the developers of LaunchBar. Set theData to (anItem's dataForType:aType)'s mutableCopy() for each type, get the corresponding data and store it all in the new pasteboard item get the types of data stored on the pasteboard item Set newPBItem to current application's NSPasteboardItem's alloc()'s init() make a new pasteboard item to store existing item's stuff Repeat with anItem in thePasteboard's pasteboardItems() Set thePasteboard to current application's NSPasteboard's generalPasteboard() get the pasteboard and then its pasteboard items Set aMutableArray to current application's NSMutableArray's array() - used to store contents Tell application "System Events" to keystroke "c" using ĭelay 1 - Without this, may restore clipboard before pasting. I ended up giving up on services entirely and used GUI scripting and the clipboard to get and set the selected text: my process("/Users/mjt/Library/Application Support/BBEdit/Text Filters/titlecase.py") However, GUI scripting the menu bar doesn’t seem to work in MarsEdit, one of the apps where I would use the scripts most frequently. Set _menuItem to menu item _serviceName of _servicesMenu Set _servicesMenu to menu 1 of menu item "Services" of _appMenu Set _frontApp to first application process whose frontmost is true I wrote a script to use GUI scripting to invoke my service from the Services menu: my runServiceNamed("Title Case") How about using FastScripts to assign keyboard shortcuts and run the scripts? Unfortunately, most applications are not scriptable enough to access the selected text. This is fine for occasionally used scripts, where keyboard shortcuts would not be practical, but not for ones I use many times per day. However, this takes multiple steps: long Command-Space to load the text, Tab, type the name of the script/service, Command-Shift-C to copy the result text and paste it back. My first thought was to use LaunchBar, which I knew could get and replace the selected text (either using a script or a service). The Keyboard preferences pane is awkward to use, so that it takes a long time to go through the list checking and unchecking the appropriate boxes. This makes the Services contextual menu unwieldy. It also forgets which services I’ve enabled and disabled, hiding my favorite scripts and bringing back dozens of commands that I never use. They still show up in System Preferences, but they usually don’t work. Over the last few months, keyboard shortcuts for system services (and PDF services) have become unreliable. Then I would assign keyboard shortcuts in System Preferences and have easy access to the scripts from any app. I’ve long used ThisService to create system services out of shell scripts that sort lines, smarten quotes, and apply title case. It seems like it should be easy to run the selected text in any app through a shell script, but I’ve run into a surprising number of issues doing this.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |