Throughout its history, BBEdit has supported many Apple technologies that failed to gain traction, including OpenDoc and PowerTalk. In 2005, TextWrangler 2.0 was released as freeware and subsequent versions continued to be distributed as such up until 2017, when it was sunsetted and incorporated into BBEdit. Bare Bones Software discontinued BBEdit Lite at version 6.1 and replaced it with TextWrangler, which was available for a fee, although significantly less than BBEdit. BBEdit Lite lacked plugin support, scriptability, syntax coloring and other features then deemed as mainly for advanced users. At the same time, Bare Bones Software also made a less-featured version of BBEdit 2.5 called BBEdit Lite available at no cost. BBEdit was the first freestanding text editor to use the "PE" editing engine, and is the only one still being developed.īBEdit was available at no charge upon its initial release in 1992 but was commercialized in May 1993 with the release of version 2.5. The Macintosh Pascal project was ultimately terminated, but the demonstration program was reworked to use the THINK Technologies "PE" text editing engine used for THINK C, which was much faster and could read larger files. The TextEdit control could not load files larger than 32 KB. The original prototypes of BBEdit used the TextEdit control available in versions of the classic Mac OS of the time. (It would if you saved the new window, but typically the results of this script aren’t going to be saved, so you’d have to set the language to HTML manually.The first version of BBEdit was created as a "bare bones" text editor to serve as a " proof of concept" the intention was to demonstrate the programming capabilities of an experimental version of Pascal for the Macintosh. Then BBEdit wouldn’t guess the language automatically. If instead we had written something like this: What’s cool about setting the contents of the window as a property is that if you’re using BBEdit 6.5, BBEdit will guess the source language of the text, and will apply HTML syntax coloring (assuming the URL you fetched was for an HTML document), even if HTML isn’t your default language for new windows. The do shell script command returns the shell’s output as a string.įinally, we create a new BBEdit text window with the contents of the curl output. If you don’t want to see the HTTP headers in the script’s output, remove the “-i” switch. We don’t need to check which button was clicked, however, because the display dialog command is smart enough to know what a “Cancel” button means - if you run the script and choose “Cancel”, the script terminates as soon as the dialog is closed.Īfter updating the contents of my_url, we use the do shell script command to invoke the command-line utility curl. The contents of the text input field are set to the value of my_url.Īfter the dialog is dismissed, AppleScript’s magic result variable contains a record of values, including the name of the button that was clicked and the text in the input field. It defaults to the empty string.ĭisplay dialog pops up a dialog box with a text input field. Because it’s a property, the last URL you enter will be remembered the next time you run the script. My_url is a string that holds the URL we’re fetching. It’s also worth noting that curl is flexible enough to accept URLs without a protocol specifier you can just type “” instead of “”. The do shell script command puts the whole Unix command-line toolset at your fingertips - while a command line by itself does not make for a good user interface, it can be an amazingly easy-to-use programming interface. ![]() This sort of AppleScript/shell hybrid shows Mac OS X at its best. Paste it into your script editor, and save it as a compiled AppleScript in the “Scripts” folder in your “BBEdit Support” folder.īuttons (Thus, the script won’t work in Mac OS 9.) However, a Mac OS X version is a cinch to write in AppleScript, passing the HTTP work off to the command-line curl utility. The plug-in still works in BBEdit 6.5, but only in Mac OS 9. Even better, HTML Grabber also lets you see the HTTP headers, which can be very useful when debugging CGI’s. Sort of like the View Source command in a web browser, except much more convenient if you’re already working in BBEdit. It’s a simple but useful little thing: choose its menu item and it pops up a dialog box into which you enter a URL click a button and the plug-in fetches the contents of the URL via HTTP, then presents the results in a new BBEdit text window. ![]() Way back in 1996, Dan Crevier wrote a nifty plug-in for BBEdit called HTML Grabber. Update: I’ve written an updated version of this article and the accompanying script. ‘Grab HTML’ Script for BBEdit Thursday, 22 August 2002
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |