• 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
Re: How to get started with AppleScript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get started with AppleScript?


  • Subject: Re: How to get started with AppleScript?
  • From: "Marc K. Myers" <email@hidden>
  • Date: Fri, 27 Sep 2002 13:26:41 -0400

Message: 4
Date: Fri, 27 Sep 2002 10:16:08 +0100
To: Applescript Mailing List <email@hidden>
From: Graham Samuel <email@hidden>
Subject: How to get started with AppleScript?

[...Snip!]
ask the user to select a folder [of input files]
ask the user to select a folder [for output files]
for each file in the selected folder
open the file
do stuff
rename the file
save the file
end for

I have not yet got the idea of the way AppleScript can do the 'for
each' part of this, so that you don't have to hard wire the path/
filename of each file, tho it surely can.

I would very much appreciate it if someone could suggest an
appropriate learning resource, hopefully rich in examples.

The best tutorials I've found are _Danny Goodman's AppleScript Handbook_ and the excellent "AppleScript Primer" series of web articles by Bill Briggs (<http://www.maccentral.com/columns/briggs.shtml>)

set inFldr to (choose folder with prompt "Select the input folder")
tell application "Finder" to set theFiles to (files of inFldr) as alias list
repeat with aFile in theFiles
tell application "someApp"
open aFile
frablejam document 1
close document 1
end tell
tell application "Finder" to set name of aFile to "someThingElse"
end repeat

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[9/27/02 1:22:10 PM]
_______________________________________________
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.

  • Prev by Date: What's good program design in applescript?
  • Next by Date: Close window
  • Previous by thread: Re: How to get started with AppleScript?
  • Next by thread: Dictionary possibilities [Re: Interesting... AppleScript X ??]
  • Index(es):
    • Date
    • Thread