Jump to content

  •  

Photo

How to highlight URLs in text?


  • Please log in to reply
6 replies to this topic

#1 K1200  old hand

K1200
  • Members
  • 588 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Intermediate
  • Time Online: 20d 11h 23m 28s

Posted 20 January 2009 - 03:47 PM

Can anyone offer a suggestion for a good approach to highlight URLs within text fields? FMP has provided the right-click "Open: http: //........" for years. However, it's often hard to spot a short URL (like http:// www .m-w.com) in a large text block. I'd like to have any URL highlighted in a different text color or maybe underlined like a link.

I've considered occasionally running a script to parse all text fields in my application and insert color settings. Or (in FMP 10) have a script that executes upon exiting each field, to modify them one at a time. Hopefully, someone has considered this before and can offer some insight.

Thanks for any help.
  • 0

#2 Lee Smith  Like v13 layout tools

Lee Smith
  • Staff
  • 10,033 posts
  • FM Application:13 Advance
  • FMGo:iPhone / iPod Touch
  • Platform:Mac OS X Mavericks
  • Skill Level:Expert
  • Membership:TechNet
  • Time Online: 218d 20h 48m 37s

Posted 20 January 2009 - 04:26 PM

Is the text field a concatenation of several fields? i.e. Name, address, web site, notes, etc., or is this a large text field where the information is already part of the text in the field?

Lee
  • 0

#3 Ocean West  I have an idea!

Ocean West
  • Administrators
  • 2,752 posts
  • LocationSan Diego
  • FM Application:13 Advance
  • FMGo:iPhone / iPod Touch, iPad
  • Platform:Mac OS X Mavericks
  • Skill Level:Expert
  • Certification:7, 8, 9, 10, 11, 12, 13
  • Membership:TechNet, FileMaker Business Alliance
  • Time Online: 44d 13h 5m 4s

Posted 20 January 2009 - 05:41 PM

an option would also be to use a web viewer to display the text block then the url's would appear as links making them clickable...

http://www.filemaker...ta-objects.html

http://sixfriedrice....ithout-the-web/
  • 0
Stephen Dolenski
FM Forums.com Founder, Administrator

#4 K1200  old hand

K1200
  • Members
  • 588 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Intermediate
  • Time Online: 20d 11h 23m 28s

Posted 20 January 2009 - 06:53 PM

Lee --

It's a large text field. And I forgot to mention that it might contain more than one URL.


Ocean --

An interesting idea. Unfortunately, the layouts involved are somewhat set in stone so web viewer can't be used in my specific instance.
  • 0

#5 comment  consultant

comment
  • Members
  • 23,980 posts
  • Time Online: 320d 11h 3m 38s

Posted 21 January 2009 - 02:40 AM

It should be quite easy to "highlight" the http:/ prefix, by substituting it with a styled version of the same. To do this for the entire URL would require a custom recursive function (or a script) - which could get rather complex, esp. since a URL can be followed by a variety of punctuation characters.
  • 0

#6 K1200  old hand

K1200
  • Members
  • 588 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Intermediate
  • Time Online: 20d 11h 23m 28s

Posted 21 January 2009 - 10:08 PM

Thanks for the suggestion.

I'll probably just go for the highlight of the prefix. Oddly, though, FileMaker has an internal calculation that can exactly isolate a URL within text. It never seems to miss displaying the "Open://www......." upon a right click within the field. Too bad it can't be accessed.
  • 0

#7 comment  consultant

comment
  • Members
  • 23,980 posts
  • Time Online: 320d 11h 3m 38s

Posted 21 January 2009 - 11:58 PM

I suspect this is a service provided by the OS and not something that Filemaker does on its own. At least on a Mac, you get the same option in just about any application that allows you to edit text. In any case, Filemaker programmers have access to regular expressions - unlike Filemaker developers.
  • 0




FMForum Advertisers