• 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
difficulties with read file applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

difficulties with read file applescript


  • Subject: difficulties with read file applescript
  • From: TSK Gmail <email@hidden>
  • Date: Thu, 17 Dec 2009 01:33:46 -0700

Hi,

I am a newbie to MAC and just learning the AppleScripts.. I have a strange problems

While using the following script i get the following output

"{\\rtf1\\ansi\\ansicpg1252\\cocoartf1038\\cocoasubrtf250
{\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica;}
{\\colortbl;\\red255\\green255\\blue255;}
\\paperw11900\\paperh16840\\margl1440\\margr1440\\vieww9000\\viewh8400\\viewkind0
\\pard\\tx566\\tx1133\\tx1700\\tx2267\\tx2834\\tx3401\\tx3968\\tx4535\\tx5102\\tx5669\\tx6236\\tx6803\\ql\\qnatural\\pardirnatural

\\f0\\fs24 \\cf0 this is a test page\\
\\
regards}"


--- the script ---

set theFile to choose file with prompt "Select a text file:"
set theFileReference to open for access theFile
set theFileContents to read theFileReference
return theFileContents
close access theFileReference

----- end script ----

and selecting a simple testPage.rtf file with the following data

this is a test page

regards

What am i doing wrong, how do i just get the below and not the ouput?

this is a test page

regards

Srikanth Kamath
 _______________________________________________
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: difficulties with read file applescript
      • From: Christopher Nebel <email@hidden>
    • Re: difficulties with read file applescript
      • From: Matthew Smith <email@hidden>
  • Prev by Date: Re: Plug-ins
  • Next by Date: Re: difficulties with read file applescript
  • Previous by thread: Re: Re: Quark Bounds Not Working Like it did
  • Next by thread: Re: difficulties with read file applescript
  • Index(es):
    • Date
    • Thread