• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Default AppleScript Formatting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Default AppleScript Formatting


  • Subject: Default AppleScript Formatting
  • From: Phi Sanders <email@hidden>
  • Date: Wed, 24 Oct 2001 15:48:43 -0400

>I recall a discussion on the list some months back about the
>preferred "modern" settings for AppleScript Formatting on this
>list a while back.

One tip is to only use monospace fonts - like Monaco - as it makes it
easier to compare spelling, etc, as well as locate and balance operators.


New text (uncompiled) monaco 12pt plain black
Operators - monaco 10pt plain black
Language Keywords - monaco 10 pt BOLD black
App keywords - monaco 10 pt BOLD green
Variables (and subroutine names) - monaco 10 pt BOLD blue
Values (aka "literals") - monaco 10 pt plain red
Comments - monaco 10 pt italic purple
References - monaco 10 pt italic yellow


I find too much color creates confusion, so I limit it to those items
that should stand out the most. Uncompiled text is only around for a few
seconds, and is where your attention is focused, so it's OK (IMHO) for
the subtlest distinction (size) to be there. I think operators and
language keywords need to "fade back" when you're looking at higher
logic, so I make them basic black as well. Red & green seperated by BOLD
vs Plain - and blue-yellow separated by BOLD vs Italic, so it should be
legible to color blind as well. (although unintentionally)

I'd suggest underline is best reserved for a clue to syntax errors...
when the compiler barfs - underline the relevant code until it's edited
or recompiled. (in addition to the highlight) - while we're at it - can
you make the script editor scroll to where the offending code is
highlighted?

~Phi

....................................................
Before enlightenment, you chop wood and carry water.
After enlightenment, you chop wood and carry water.
-- Zen Proverb


  • Follow-Ups:
    • Re: Default AppleScript Formatting
      • From: Bill Briggs <email@hidden>
  • Prev by Date: How do we sort a list?
  • Next by Date: Eudora weirdness when failing to set a var to selected text
  • Previous by thread: Re: How do we sort a list?
  • Next by thread: Re: Default AppleScript Formatting
  • Index(es):
    • Date
    • Thread