Creating links

Richard Gaskin ambassador at fourthworld.com
Thu Oct 24 00:45:01 EDT 2002


Terry Judd wrote:

> OK, surely this can't be difficult. How do I select some text in a
> field and then set its linkText property without having to resort to
> "set the linkText of..." in the message box? I'm having real problems
> even querying the selectedChunk given that it automatically deselects
> as soon as I click in the message box (or anywhere else for that
> matter).

You could add this to a backscript:

on functionKey k
  if k = 4 then
    get the selectedChunk
    if it is not empty then
      put it into tSaveSel
      ask "Link to:" with "http://www.fourthworld.com"
      if it is empty then exit to top
      select tSaveSel
      set the linkText of the selection to it
    end if
  end if
end functionKey



-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the Use-livecode mailing list