set RTFtext

Jan Schenkel janschenkel at yahoo.com
Mon May 24 19:09:01 EDT 2004


--- Michael Monos <runtime at newrome.org> wrote:
> Help!
> 
> I have no idea what I am doing, and after searching
> through the 
> archives of the mailing lists without
> finding an answer, I thought I would try to get an
> answer via a post 
> here...
> 
> with a button on anyCard, with the script (OS X):
> 
> on mouseup
> 	set the rtftext of field "text" to URL
> "file:filename.rtf"
> end mouseup
> 
> This produces no result -- do I need a path? Do I
> need to declare the 
> path of this filename somewhere?
> 
> What is the path structure needed in OS X? I
> understand file paths, but 
> even when I enter the full path (as I understand
> it),
> I get no result.
> 
> Any help would be appreciated.
> 
> Thanks
> 

Hi Michael,

Try this script :
--
on mouseup
  answer file "Import which RTF file ?"
  if it is empty then exit mouseUp
  put it -- display the path in the message box
  set the rtftext of field "text" to \
      URL ("file:" & it)
end mouseup
--
This way you can see what path you actually get from
the operating system.

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the use-livecode mailing list