• 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: reading a file in an applescript.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reading a file in an applescript.


  • Subject: Re: reading a file in an applescript.
  • From: Doug McNutt <email@hidden>
  • Date: Fri, 21 Mar 2008 14:43:43 -0600

At 13:10 -0700 3/21/08, Michelle Steiner wrote:
>On Mar 21, 2008, at 12:58 PM, Doug Meade wrote:
>
>>   tell application "Finder"
>>
>>          set theScriptPath to (container of application file (path to me) as Unicode text)
>>
>>    end tell
>>
>>    set theTextFile to (theScriptPath & replyTemplateName)
>>
>>    set targetFile to theTextFile
>>
>>    set readHandle to (open for access targetFile)
>>    set fileText to (read readHandle for (get eof readHandle))
>>    close access readHandle
>>    FileText
>>
>
>add "as alias" after "set targetFile to the TextFile"

"the", "a", and some other articles are totally ignored by Applescript.

so. . .
set theTextFile to (theScriptPath & replyTemplateName)
does nothing to define a variable called  "theTextFile"

Spaces are ignored - sometimes. And it's entirely too easy to type the value (English-like) when you mean thevalue (Programming lingo).

--

--> From the U S of A, the only socialist country that refuses to admit it. <--
 _______________________________________________
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: reading a file in an applescript.
      • From: Christopher Nebel <email@hidden>
    • Re: reading a file in an applescript.
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: reading a file in an applescript. (From: Doug Meade <email@hidden>)
 >Re: reading a file in an applescript. (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: reading a file in an applescript.
  • Next by Date: Re: reading a file in an applescript.
  • Previous by thread: Re: reading a file in an applescript.
  • Next by thread: Re: reading a file in an applescript.
  • Index(es):
    • Date
    • Thread