• 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: clipboard contents into textfile.........
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clipboard contents into textfile.........


  • Subject: Re: clipboard contents into textfile.........
  • From: wemedge <email@hidden>
  • Date: Thu, 11 Oct 2001 08:51:43 -0400

It looks like you are trying to call a handler without actuallty declaring
one. Try this:

on run

set the messageText to (the clipboard) as text

set fileTarget to "Macintosh HD:newfile" as text

writeData(messageText, fileTarget)

end run

on writeData(m, f)

try
set theFileReference to open for access file f with write permission
set eof theFileReference to 0
write m to theFileReference
close access theFileReference
on error errMsg number errNum
try
close access theFileReference
end try
error errMsg number errNum
end try

end writeData

I think this will help with your other posting as well.

Bill

> The Script is :
>
> on run
> set the messageText to (the clipboard) as text
>
> set fileTarget to "Macintosh HD:newfile" as text
>
> writeData(messageText,fileTarget)
>
> try
> set theFileReference to open for access file fileTarget with write
> permission
> set eof theFileReference to 0
> write messageText to theFileReference
> close access theFileReference
> on error errMsg number errNum
> try
> close access theFileReference
> end try
> error errMsg number errNum
> end try
> end writeData


References: 
 >clipboard contents into textfile......... (From: "kannan balu" <email@hidden>)

  • Prev by Date: "An error of type -619 has occured"
  • Next by Date: Re: HelpPlease!!: Running Scripts causing Garbage characters.
  • Previous by thread: clipboard contents into textfile.........
  • Next by thread: Re: clipboard contents into textfile.........
  • Index(es):
    • Date
    • Thread