• 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: applescript-users digest, Vol 3 #2877 - 14 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescript-users digest, Vol 3 #2877 - 14 msgs


  • Subject: Re: applescript-users digest, Vol 3 #2877 - 14 msgs
  • From: kai <email@hidden>
  • Date: Wed, 15 Sep 2004 20:47:05 +0100


On Fri, 6 Aug 2004 14:50:40 -0500, "Adam K. Wuellner" <email@hidden> wrote:


set myFile to (path to "docs") & "Awake_Times" as file

generates an error "Can't make (alias "iMac
HD:Users:rpoland:Documents:","Awake_Times"} into a file."

set myFile to (path to "docs" as string) & "Awake_Times" as alias

Note I used alias instead of file... 'as file' fails, 'as alias'
works, OMM.

I thought I might have just had the syntax wrong, but this fails, too:

   set myFile to file ((path to "docs" as string) & "Awake_Times")

while this works:

   set myFile to file ((path to "docs" as string) & "Awake_Times") as
alias

So, I guess, first make sure you are concatenating two strings, not an
alias and a string, so that you get your path as a string rather than a
list of an alias and a string.  Second, if you can't figure out the
'file' part better than I could (I still haven't hit the documentation,
fwiw), try using an alias.

Try this:

set myFile to (path to "docs" as Unicode text) & "Awake_Times" as file specification

---
kai

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: applescript-users digest, Vol 3 #2877 - 14 msgs
      • From: kai <email@hidden>
  • Prev by Date: Re: File Vault and File References
  • Next by Date: Re: applescript-users digest, Vol 3 #2877 - 14 msgs
  • Previous by thread: Re: [OT] Avoiding Unnecessary Updates -- WAS: Re: IS: Script Editor Styles Format Change Script -- WAS: Re: String to list conversion
  • Next by thread: Re: applescript-users digest, Vol 3 #2877 - 14 msgs
  • Index(es):
    • Date
    • Thread