• 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: Introduction and procmail test
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Introduction and procmail test


  • Subject: Re: Introduction and procmail test
  • From: Graff <email@hidden>
  • Date: Sat, 19 Jun 2004 15:33:59 -0400

On Jun 19, 2004, at 3:28 PM, Graff wrote:

On Jun 19, 2004, at 12:51 PM, Joe Klemmer wrote:

On Sat, 2004-06-19 at 11:31, Graff wrote:

Finally, view the dictionaries of the scriptable applications. It's
the dictionaries that really give you the syntax to control each
application.

Thanks for the links. I think I have some of these but it's good to
get as many as possible.

I looked through the dictionaries in Script Debugger but didn't find
anything with specific commands for the Finder. Apparently there's some
kind of built-in archiving/compression, zip-like capabilities in Finder
that I need to use. Time to start some major digging.

The Finder doesn't have anything in its AppleScript dictionary about archiving files but you can easily do it via the shell in AppleScript:
----
set theFolder to choose folder "Choose the folder to archive."
set theSource to quoted form of POSIX path of theFolder

set theFolder to choose folder "Choose where the archive should be placed."
set theDest to quoted form of ((POSIX path of theFolder) & "archive.zip")

do shell script "/usr/bin/ditto -c -k --sequesterRsrc " & theSource & " " & theDest
----

Heh, minor mess-up there. The script works but the prompts in the file dialogs don't come up. I forgot to put in the "with prompt" part. Here's a cleaner version:
----
set theFolder to choose folder with prompt "Choose the folder to archive:"
set theSource to quoted form of POSIX path of theFolder

set theFolder to choose folder with prompt "Choose where the archive should be placed:"
set theDest to quoted form of ((POSIX path of theFolder) & "archive.zip")

do shell script "/usr/bin/ditto -c -k --sequesterRsrc " & theSource & " " & theDest
----

I mess up like this all the time. I'm sure it's because the "display dialog" command doesn't have the "with prompt" part to it so I forget to use it with the file and folder choosers. Oh well...

- Ken
_______________________________________________
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: Introduction and procmail test
      • From: Joe Klemmer <email@hidden>
References: 
 >Introduction and procmail test (From: Joe Klemmer <email@hidden>)
 >Re: Introduction and procmail test (From: Graff <email@hidden>)
 >Re: Introduction and procmail test (From: Joe Klemmer <email@hidden>)
 >Re: Introduction and procmail test (From: Graff <email@hidden>)

  • Prev by Date: Re: Introduction and procmail test
  • Next by Date: Re: Introduction and procmail test
  • Previous by thread: Re: Introduction and procmail test
  • Next by thread: Re: Introduction and procmail test
  • Index(es):
    • Date
    • Thread