Re: ongoing Senior moments
Re: ongoing Senior moments
- Subject: Re: ongoing Senior moments
- From: Robert Poland <email@hidden>
- Date: Sun, 09 Nov 2014 17:29:16 -0700
> On Nov 9, 2014, at 12:29:PM, Luther Fuller <email@hidden> wrote:
>
> On Nov 9, 2014, at 1:03 PM, Robert Poland wrote:
>
>> This script snippet confounds me;
>>
>> tell application "Finder"
>> set theFolder to "" & "~/Pictures/APOD ƒ/"
>> set theFolder to (choose file default location alias the folder
>> end tell
>>
>> I keep getting error; Expected “,” but found end of line.
>
> You forgot the ")" at the end of line 2.
>
> I did something like that a few days ago ...
>
> set startLoc to (path to startup disk) -- this is an alias
> try
> choose folder with prompt "Choose a disk or folder to search" default location startLoc
> set searchLoc to the result
> on error
> return -- user cancelled
> end try
>
> An alternate to the first line might be something like this
>
> set startLoc to (folder "Applications" of startup disk) as alias
>
> or this
> set startLoc to (folder "APOD ƒ" of folder "Pictures" of startup disk) as alias
>
> And you will want to put that line within a try block just in case the folder you referenced is not there.
set startLoc to (folder "APOD ƒ" of folder "Pictures" of startup disk) as alias
try
choose folder with prompt "Choose a disk or folder to search" default location startLoc
set searchLoc to the result
on error
beep
return -- user cancelled
end try
Won’t compile in Yosemite.
Robert Poland
Fort Collins CO
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden