• 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
Learning Apple Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Learning Apple Script


  • Subject: Learning Apple Script
  • From: Greg Reyna <email@hidden>
  • Date: Mon, 29 Apr 2002 15:47:55 -0700

I'm giving another go to learning Apple Script, using Script Debugger 3.03 to help.
A couple of years ago I devoted a bit of time to learning, but it didn't pan out (my time, I mean...) I have some experience with scripting ARexx, a "Basic", non-OOP language, so I'm not completely approaching this from square one; but at times it feels like I am...

I've been slowly moving through Danny Goodman's book and have come to the "offset" command from the basic Scripting Addition commands.

First off, I got a couple of errors so I looked all over but couldn't find a list of error messages and their numbers. Why is that? Isn't this a common feature of languages? Anyway, it seems that the language has changed since this book was written because I got compilation error "-2741" on the word "Document" on this line:

choose file "Locate the file "Offset Document":" of type "QUIL"

[the error dialog reported-> "Expected end of line, etc. but found class name."]

--I don't understand... (I got rid of everything after "choose file", and the script worked fine, but what happened?)
-----

This script is using the "offset" command as a way of doing a search and replace.
After a line where the script indicates to use its own local subroutine, it has this line to tell what the replace string should be:

given replaceString: "SuperSubScript Plus"

When I typed this line I mistakenly omitted the colon, but when I went looking for the syntax of the "given" command, I couldn't find it anywhere---I don't even know where it came from. A scripting addition? Script Debugger?

Also, when assignments are made within the body of the script are they automatically "exposed" to the internal code of the subroutine? I mean does the subroutine "know" about all the assignments in the rest of the script? And if so, is there a way to isolate the subroutine so its internal code is separate from the body of the script?



Has anyone put together a program that has all the common commands most often used by Apple Script scripters? It seems like that would be very useful. You could click on a keyword and be told not only the syntax, but where it came from.

Can anyone clear some of this up for me?

Thanks,
Greg

--
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Learning Apple Script
      • From: Mr Tea <email@hidden>
    • Re: Learning Apple Script
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Best lib for large tables?
  • Next by Date: Re: Export Audio From QuickTime Player
  • Previous by thread: Re: Best lib for large tables?
  • Next by thread: Re: Learning Apple Script
  • Index(es):
    • Date
    • Thread