HomeThinkDifferentStoreMacBoardsAdvertisingRSS SyndicationNewsletterContact

Cool Mac Gear


iPod Video
iPod nano
iPod 1G-2G
iPod 3G
iPod 4G
iPod Mini
PowerBook-iBook
Garageband

OSX
OS X Odyssey 176 - AppleScript In Tex-Edit Plus And Response To Tom Bender's OS X Letter

Thursday, October 3, 2002


By Applelinks Contributing Editor Charles W. Moore

In his follow-up note that appears below, Tex Edit Plus developer Tom Bender says:

"I think the Cocoa development system is possibly the second best-kept secret on the planet. (The first is AppleScript.)"

I can't really speak to the Cocoa development system, being a non-programmer, although when I checked out Michael K. Mahoney's "Building Cocoa Applications: A Step-by-Step Guide" a while back, I noted:

"I'm inclined to believe that had I the time and the inclination, this book could teach even me, a complete neophyte, how to create a Cocoa program."

On the other hand, the integration of AppleScript support into Tex Edit Plus is one of the biggest reasons why I love the program so much. I have TE+ tricked out with a bunch of custom AppleScripts that tailor it precisely to my requirements, without the added fat of unwanted and unused features. Here's an article about how I customized TE+ for HTML markup: http://www.applelinks.com/mooresviews/TE+AS.shtml

AppleScript is a wonderful, Mac-only technology that allows ordinary people to create automated shortcuts with minimal effort. Tex Edit Plus's AppleScript configuration could hardly be smoother or more user-friendly. If you're not familiar with AppleScripts, they are sort of mini-applets that automate a particular function, Scripts are stored in a folder called "Scripts" in the Tex Edit Plus application folder, and appear in an AppleScript menu when Tex Edit is running. When you add new scripts to the folder, they show up in the menu instantly without your having to restart the program.

To run a script, you just open the menu and click on a selected script title. Even better, for scripts that you really use a lot, it is more convenient to assign keystroke shortcuts to activate them, which is done by simply adding the key(s)' name to the script's name with a slash -- for example: with the script Mac -> HTML/F6, press the F6 key and a copy of your document gets converted to html while you watch.

A couple of dozen or so AppleScripts are bundled with the Tex Edit Plus standard download, and because Tex Edit Plus is recordable, you can record custom scripts of your own to automate tedious or frequently repeated tasks using the Apple Script Editor utility that is included with the Mac OS.

The scripts I use most often with Tex Edit Plus relate to things like converting text from/to lower/upper case, capitalization (yes, I know there are submenu commands in Tex Edit Plus that can do this too, but an AppleScript with a single keystroke shortcut is faster and slicker), and HTML markup. I prefer to create HTML documents from scratch, and as I work, rather than using a WYSIWYG Web page authoring application, but I am not enchanted with typing a lot of tedious little HTML tags.

For example, one of the things I use Tex Edit Plus for every day is creating HTML documents of articles for posting on the Applelinks news page. The article you're reading was written and "HTMLed" using Tex Edit Plus and several AppleScripts. Unlike, say, BBEdit, Tex Edit Plus has no built-in HTML editor, but several pre-fabricated AppleScripts are available that perform various HTML conversion functions.

If you don't want to bother with creating or recording scripts yourself, Doug Adams maintains the official AppleScripts for Tex-Edit Archives, an excellent resource site site filled with free, downloadable scripts, as well as hints, tips, examples and step-by-step instructions to help you create your own AppleScripts to use with TE+.

There are currently nearly 243 diverse and useful AppleScripts in the Archive all written by and for Tex-Edit Plus users, and all free to download. Script categories include:

• Text & Character
• Document Conversions
• Window Manipulation
• Working With Files
• Printing
• HTML Authoring
• Search, Sort, Replace
• Fun Scripts
ͺ Miscellaneous
• TE+ & Other Apps

Some of the the latest script postings include:

Address Book for TE+ 1.1
• Simple and effective set of scripts to create an address database in Tex-Edit Plus. Read Me explains more. Latest version eliminates the need for some preliminary user-modifications.

Email to Mac RC
• Cleans up email messages.

All In One
• Copies the contents of every open window into one new document window. Includes "Close all others", a script which closes (with options to save) all windows but the frontmost one.

Super Replace
• Super Replace allows you to do much more powerful search and replace in Tex-Edit Plus than perhaps what you are used to. It can search and replace hilite color, any text color, and any size - in addition to the usual options (font, style, "menu-named" size, "menu-named" text colors).

You can also find:

HTML Suite
• Collection of fifteen simple scripts to assist in creating HTML formatting by somebody named Charles W. Moore

You can check it out at:
http://www.malcolmadams.com/te/

***
Tom Bender's letter
Re Tom Bender's letter
Re: OS X
Option clicking
DSL Mojo

***



Re: Tom Bender's Comments

From Thomas R. Bank

Just read Tom Bender's comments on OS X. I realize that he has finally been able to put to words what I have been trying to figure out for myself for awhile.

OS X works in the manner that I feel a computer should work. Not necessarily as fast as I would like at times, but in the way I would like. Like Tom, I usually have at least half a dozen things going at once and not have to worry about it. Actually, this is why I use a Mac in the first place. They just "feel" right when you use them.

[Current PC crashes at work today = 4....]

Having read his insights, I think my next step is that I have to check out Tex Edit. There is a pretty good chance that it works in the way I would like as well! :-)

Thomas R. Bank

___

Hi Thomas;

TE+ certainly acts the way I like an application to. It just "feels" right. :-)

I encourage you to check it out.

Charles

***

Tom Bender's letter

From John Kubie

Mr. Moore,

I'm writing to second Tom Bender's description of his OS X experience. I've found that OS X has radically changed the way I use my Mac (mainly my first generation Titanium PowerBook; also a B&W G3 and my daughter's flatpanel iMac).

One "time saver" he didn't mention was application launching. While launch times are, roughly, equivalent between 9 and OS X, in OS X you can go and do something else (read web, write email) while an application launches. Launching can occur while other things are going on and it doesn't have to be the foreground window. Also, I love "killing" applications. It took me awhile to get over my fear of this. From my 9 experience I felt that I must reboot if I ever force-quit an application. Now it just works and works quickly, with virtually no negative consequences.

One area I haven't heard people talk about much is the time that one spends in system maintenance and dealing with system degradation. Personally, I've had no problems with the 3 macs I take care of. Since there are regular reports of people who fall into some sort of system hell I assume that OS X is not bulletproof. But I'd like to get a statistical sense of how much time people spend getting OS X to work compared with 9 (and other operating systems). I do worry about having to reinstall OS X. Although it's clearly an advantage not having extensions, I regularly add "patches" (for instance, printer drivers) that do something to the OS. I assume that these are not like extensions, that they only load when you tell them to, but they make me nervous.

I find that I haven't learned optimal efficiency in OS X. I generally have too many applications and too many windows open. This makes me hungry for RAM, processor speed (number of processors) and screen real estate.

Other "biggie" advantages are fairly obvious: network compatibility with other operating systems and inclusion of full unix beautifully hidden below the hood.

Overall, OS X gives me the feeling of having my old computer (OS 9) plus. And the plus is very large. Like many others, I feel more comfortable in OS X applications. They look and feel better.

So, OS X clearly appeals to me. But I'm an old-time quasi-power user. What about the more casual user? Here I have limited experience. My 11 year old daughter (who has the iMac) seems remarkably at ease in OS X. She was also at ease in OS 9 before our old iMac died. I taught her to boot into 9 to run some older software. She seems to prefer OS X. She appears to be very efficient in OS X and appears to find it intuitive. (I've exchanged her mouse a few times; she has a strong preference for a 2-button mouse with a scroll wheel which "works" in OS X without system modification). OS X seems to be a very intuitive and attractive operating system. Other than system rebooting, it's not clear which version of the mac OS she's most efficient in.

John Kubie

***

Re Tom Bender's letter

From Jeremy Scott-Joynt

Charles,

A fascinating letter from Tom Bender, and I find myself in agreement with his assessment of what makes (for him and for me) OS X just 'better', despite my decade of investment - both personal and financial - in the old Mac OS.

For the two people out there who haven't tried it yet, neither you nor Tom have really brought out what's so good about TE+, and about the Mac platform. In a number of areas, Mac developers have brought out applications which 'just work', which do what you want them to do, and in some cases go beyond much more expensive packages. I use Windows machines constantly in a work environment, and have to date never come across apps which combine the same levels of professionalism and features at the ludicrously cheap prices that the likes of Tom charge. (If there's anyone out there using TE+ without coughing up the fee, please do so. These guys earn it many times over.) I remember a year or two spending hours looking for a text editor for the PC which measured up to TE+'s standards, and I was conspicuously unsuccessful. That being said, of course, I'm quite willing to be corrected by other twin-platform types who read this - please do tell if PC equivalents exist, 'cos they'd still be hugely useful!

I'm not going to try to compile a list of similar applications in other fields than text editing, but I must mention just one. Graphic Converter costs $30, does almost everything anyone other than a pro designer or photographer would want from Photoshop, and has opened graphics files corrupted in transit that every other app I own has given up on.

And if that weren't enough, its developer, Thorsten Lemke, is one of the most prompt and helpful responders to bug reports that I've ever come across, only matched by the lads and lasses at the Omni Group on the rare occasion Omniweb has presented a problem.

Best wishes to all,

j

Jeremy Scott-Joynt
Business reporter, BBC NewsOnline

***

Re: OS X

From Tom Bender

Howdy:

BTW, if you get a chance, take a look at the "New and Improved" Tex-Aid included with my latest beta. I changed the interface to take advantage of some surprisingly useful "live feedback" features.

The really interesting thing (at least to me) is that those changes took only a few minutes and a few lines of AppleScript. The source code for Tex-Aid is included in the archive. Man, anyone can do this.

I think the Cocoa development system is possibly the second best-kept secret on the planet. (The first is AppleScript.)

Thank you for everything!

Sincerely,
Tom

***

Option clicking

From Michael

Charles

The dialog continues. Jonathan Tyzack's suggestion to option-click in the scroll bar to jump ahead or back to that part of the document in proportion to the spot clicked in IS SO COOL! I had NO IDEA! He just handed me and ...(you)??... a real time saver in doing certain types of document work. THANKS Jonathan!

Michael

___

Hi Michael;

Yes; another useful keyboard shortcut I was previously unaware of.

Charles

***

DSL Mojo

From Roger Harris

Hi Charles,

I have something totally worthless to share. My DSL was dead this morning and I was on the phone trying to get through to somebody in the DSL underworld to get my Mojo work'n. If anyone really wonders why there is a waiting period for gun purchases all they have to do is dial into the "automated" phone services ( if the word services can ever really be associated with the phone company) at the Telephone company. After many hours of using the telephone key pad to reenter my life story to tape recorders in SBC basements all over America, I was dumped off on the folks that made my Cayman DSL router. Netopia, they had people on the phones after you pressed only TWO buttons. Buy something from them; FAST, you have got to experience this.

My big problem with the DSL was that I couldn't get into the Cayman router to see what was wrong. One can usually access the dark innards of it with a web browser and a secret handshake. But I could not get into mine and figured it was probably toast. Here is were it gets fun.

The Netopia Tec Shaman has me jump through some hoops and then ask; "Do you have Telnet on your computer?" I told him it was a Mac, but I was running OSX. he said he wasn't familiar with OSX and thought Apple had hidden the terminal. I told him it was just in the utilites folder and started it up. I could tell he was a bit surprised and perplexed. I told him that if he told me what to type I could give it a try. We went into the belly of the great fish. We ran some test, found the problem and fixed it. He spit me up on the beach.

And you might say, So What! I say that I never thought I would ever do something like that on any computer of mine; Much less my Mac. I got a big kick out of it; How Geeky!

Roger Harris

___


Hi Roger;

Thanks for the anecdote. I expect that most of us non-geek users would be astounded at the power tools available to us in OS X if we only knew what to do with them.

Charles

***

The OS X Odyssey archives may be accessed here:
http://www.applelinks.com/news/odyssey/

***

***
Charles W. Moore

Note: Letters to Moore's Mailbag may or may not be published at the editor's discretion. Correspondents' email addresses will NOT be published unless the correspondent specifically requests publication. Letters may be edited for length and/or context.

Opinions expressed in postings to Moore's MailBag are those of the respective correspondents and not necessarily shared or endorsed by the Editor and/or Applelinks management.

If you would prefer that your message not appear in Moore's Mailbag, we would still like to hear from you. Just clearly mark your message "NOT FOR PUBLICATION," and it will not be published.

CM


Charles W. Moore

Email This Article - Comment On This Article

Recent News
Page: 1 - 2 - 3 - 4 - 5

.