It’s built from two parts: a rounded-corner rectangle filled with a gray gradient, and 16×16 BBEdit icon. The Finder toolbar uses a 32×32 icon, so I only needed to make that one size. Making the app’s icon was a bit trickier. The LSUIElement key, when set to 1, identifies the app as an “agent,” and agents don’t appear in the Dock. I added the following items inside the main element: LSUIElement Inside the Contents folder is a file called ist. Right-click on the app and choose Show Package Contents from the menu. We’ll deal with these deficiencies in reverse order. I saved this as an application with the name “Open in BBEdit.” At this point, it does what it’s supposed to, but its icon is generic and appears in the Dock when the app is launched. I added Lines 9 and 10 to work around a bug in Lion and Mountain Lion that’s discussed in the comments. Also handles dropped files and folders.ģ: - Original (for TextMate) by Henrik Nyh ġ3: set finderSelection to folder of the front window as stringġ5: set finderSelection to selection as alias list The AppleScript that launches BBEdit is pretty much a straight steal of Henrik’s, with “BBEdit” substituted for “TextMate.” applescript:ġ: - Opens the currently selected Finder files, or else the current Finder window, in BBEdit. If you’re interested in building a similar app/button of your own, here are some details: If you just want to use the button, that’s all you need to know. If you’re running Mountain Lion (I’m not), you may need to run the app directly from the Finder to deal with the new code-signing/Gatekeeper infrastructure. Then Command-drag it to your Finder toolbar. To use the button, download the zipped “Open in BBEdit” application, unzip it, and put the unzipped application in your Applications folder. But when I need to edit an HTML file, I use the button to open it in BBEdit. html files are set to open in Safari, and I want to keep it that way. The value of the button is that it can quickly open files in BBEdit when it isn’t their default application. Dragging files or folders to the button opens the dragged items.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |