Fwd: Newbie to Applescript
Fwd: Newbie to Applescript
- Subject: Fwd: Newbie to Applescript
- From: Chuck Lefebvre <email@hidden>
- Date: Thu, 15 Nov 2001 16:32:36 -0700
Mr Tea doesn't have access to a machine with OS X.
His solution would be easy to implement, but it doesn't work in OS X.
Anybody with Mac OS X applescript experience out there?
I know that their is some issues out there with the finder.
My first step is to trying to copy a single file to another location.
Can't seem able to use the recorder with the finder, but it works with
other applications.
Begin forwarded message:
>
From: Chuck Lefebvre <email@hidden>
>
Date: Thu Nov 15, 2001 08:02:24 AM America/Phoenix
>
To: Mr Tea <email@hidden>
>
Subject: Re: Newbie to Applescript
>
>
I'm working in OS X 10.1 and now OS X 10.1.1.
>
>
I've tried to use your example, but with no luck.
>
tell application "Finder" to duplicate file "Macintosh_HD1:Driver
>
License" to folder "Macintosh HD:Work Drive:"
>
>
I get the dreaded Finder got an error: can set folder it mentions the
>
statement above
>
I appreciated your help in the past, I guess Mac OS X can't even record
>
a finder script.
>
>
Thanks
>
Chuck
>
>
On Tuesday, November 13, 2001, at 05:06 PM, Mr Tea wrote:
>
>
> This from Chuck Lefebvre - dated 13/11/01 10.45 pm:
>
>
>
>> I would like to duplicate an individual file, and it's not stored on
>
>> the
>
>> desktop. All of the example that I've seen, show you how to copy
>
>> folder from
>
>> the desktop.
>
>
>
> The most compact way of defining the location of a file or folder in
>
> AppleScript is to use a path, with each item separated by a colon and
>
> the
>
> whole thing wrapped in double quotes.
>
>
>
> So if you have a file called "My File" in a folder called "My Folder"
>
> on a
>
> disk called, er, "My Disk" and you want to copy it to a folder called
>
> "My
>
> Other Folder" on the same disk, it would look something like this:
>
>
>
> tell application "Finder" to duplicate file "My Disk:My Folder:My
>
> File" to
>
> folder "My Disk:My Other Folder:"
>
>
>
> That should all be on one line, and note that when the final item in
>
> the
>
> path is a folder, its name is followed by a colon.
>
>
>
> A less economical way to define a path is demonstrated when you use the
>
> Script Editor to record actions in the Finder, with this format:
>
>
>
> file "My File" of folder "My Folder" of disk "My Disk"...
>
>
>
> HTH
>
>
>
> Mr Tea
>
> --
>
> Brew of the day: Breakfast Blend
>
> _______________________________________________
>
> applescript-users mailing list
>
> email@hidden
>
> http://www.lists.apple.com/mailman/listinfo/applescript-users