• 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: ongoing Senior moments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ongoing Senior moments


  • Subject: Re: ongoing Senior moments
  • From: Yvan KOENIG <email@hidden>
  • Date: Sun, 09 Nov 2014 20:37:52 +0100

> Le 09/11/2014 à 20:03, Robert Poland <email@hidden> a écrit :
>
> Hi,
>
> 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.
> Using "~/Pictures/APOD ƒ/“ in place of theFolder doesn’t help.
> After restarting Smile I get the error “file Alias "~/Pictures:APOD ƒ/“ of <<script>> wasn’t found.
>
> using;
> set theFolder to choose file default location alias "Macintosh HD:Users:rpoland:Pictures:APOD ƒ”
> Works, but I want it to be independent pf which machine it’s on.
>
> The goal is to do a choose folder with a default.
>
>
> Robert Poland
> Fort Collins CO

Hello Robert

It seems that you forgot that the Finder doesn't understand Unix pathnames.
If you want something working try to use :

# use a function from the OSAX Standard Additions
set theFolder to (path to home folder as text)&"Pictures:APOD ƒ:"
# use a function from the OSAX Standard Additions
set theFolder to  (choose file default location alias the folder)
# If my memory is right, theFolder will be a list of one alias
# so it would be useful to add
set theFolder to item 1 of theFolder


Speaking to the Finder in your code is absolutely useless.

Yvan KOENIG (VALLAURIS, France) dimanche 9 novembre 2014 20:34:48


 _______________________________________________
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


  • Follow-Ups:
    • Re: ongoing Senior moments
      • From: Robert Poland <email@hidden>
References: 
 >ongoing Senior moments (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: ongoing Senior moments
  • Next by Date: Re: ongoing Senior moments
  • Previous by thread: Re: ongoing Senior moments
  • Next by thread: Re: ongoing Senior moments
  • Index(es):
    • Date
    • Thread