Re: ongoing Senior moments
Re: ongoing Senior moments
- Subject: Re: ongoing Senior moments
- From: Thomas Fischer <email@hidden>
- Date: Mon, 01 Dec 2014 14:07:28 +0100
Hello,
Am 01.12.2014 um 12:53 schrieb Shane Stanley <email@hidden>:
> On 1 Dec 2014, at 10:38 pm, Yvan KOENIG <email@hidden> wrote:
>
>> I'm puzzled.
>>
>> Must I assume that the french system is more fair than the English one ?
>
> No; I was using a path to a folder that didn't exist. But I still don't fancy relying on it longer-term. Especially when there's a simple alternative:
>
> use framework "Foundation"
> use scripting additions
>
> set theFolder to "~/Pictures/APOD ƒ/"
> set theFolder to (current application's NSString's stringWithString:theFolder)'s stringByExpandingTildeInPath() as text
> set theFile to (choose file default location (POSIX file theFolder) as alias)
while I tend to agree on the long-term reliability issue I have to confess: I don’t like ASObjC!
In an AppleScript context it sticks out like a sore thumb.
I also would be hard pressed to call
> set theFolder to (current application’s NSString’s stringWithString:theFolder)'s stringByExpandingTildeInPath() as text
a simple alternative to
tell application "System Events“ to set theFolder to path of disk item theFolder
even disregarding the use clauses.
Cheers
Thomas
_______________________________________________
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