Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Align text through script

Featured Replies

Hallo everybody,

I want to create a script which will chage alignment of selected text in field. Not in whole field, just selected text (paragaph in which is a cursor). Usualy Title of text is cenetered, text is letf aligned, ec...

I dont want to end user use "Format" menu and toolbar "Text formatting", because I have created Menu for end user.

Any opinion will be helpfull.

TIA

There are a couple of files here at the Forum:

File Name is [color:blue]Various Styles in text! By: Bob Kundinger Located Here

http://fmforums.com/forum/showtopic.php?tid/46863/

File Name is [color:blue]Count Lines of Wrapped, Styled, Non-monospaced Text By: Bob Weaver Located Here

http://fmforums.com/forum/showpost.php?post/55092/

And a few at other sites:

File Name is [color:blue]Fotex t2.5 By: netOversaetter Located Here

http://www.fmfiles.com/enduserbus14.html

File Name is [color:blue]Custom Form Letters 2 By: John Mark Osborne Located Here

http://www.databasepros.com/resources.html

File Name is [color:blue]Automatic Application of Multiple Character Formats in a Field By: Ray J. Cologon Located Here

http://www.nightwing.com.au/FileMaker/

File Name is [color:blue]Text Style Tester By: John Mark Osborne Located Here

http://www.databasepros.com/resources.html

HTH

Lee

  • Author

Thank you very much Lee for your answer, and for your time!

Examples from your answer are about formatting text color, text style and are very helpful, but not for my alignment wishes. One below url, looks like can be very helpful for me, but unfortunately is only for Mac users :P .

File Name is [color:blue]Fotex t2.5 By: netOversaetter Located Here

http://www.fmfiles.com/enduserbus14.html

Unfortunately, because describe for Fotex t2.5 on url is "An amazing Word Processor built with FileMaker Pro!"

You have 8 Advanced. I'm wondering why you don't remove the Format options from the menu by using a Custom Set. Ctrl+] will still allow them to right-justify - even without selecting the text first. You haven't described your restrictions but, between Privilege Sets and Custom Menus, it shouldn't be a problem.

I understand wanting control - heck, I REMOVE the menus (smile) and I provide other text formatting options. But I've never tried to make FM into a Word Processor. Nonetheless, you have options ... :wink2:

Wow. How crazy is that. I use SecureFM to remove everything. And I can't switch to Custom menus because SecureFM isn't out yet (for FMA). So I haven't worked with Custom Menus. Why is THAT the ONLY option I can't duplicate? Very strange indeed...

If you save your file with only the text formatting displaying, then script Hide Toolbars, you can script showing it again for just this layout. I agree it would be nice to have - at LEAST at the menu level. We should have the ability to duplicate and change what displays.

But disallowing Toolbars by script eliminates display (they grey out) but you can still access the shortcut keys, it appears.

  • Author

Hallo LaRetta,

My project is an CMS application. So, I want to make something like very basic Word Processor, to afford end-user to write and format articles in FileMaker, and update formated text do MySQL database.

Generally, I think that is easier for end-user to hit the button instead of using Keyboard shortkeys; anyway, if end-user select title and hit Ctrl+ to set alignment of title on "center", function GetAsCSS can't trap that action from field, and after "submit" when article is updated on MySQL database, in browser title will be still aligned on left.

Edited by Guest

AFAIK only character formatting can be scripted in FMP. You are asking for paragraph formatting which can be done using the Format menu commands, but not through a script.

  • Author

Thank you Vaughan.

Unfortunately...., anyway, if I find something interesting, I will post it here.

  • Author

FM Forum friend, Ino from Croatia, send to me great stuff - ClickStyle from Bob Cusick; but unfortunately not for my OS (MAC OS classin only). You can find and download it from http://www.clickware.com/products_clickstyle.htm ; product is free.

Thanx Ino!

This solution uses AppleScript, so it'll never be cross-platform. It was designed at at time when FMP supported virtually NO formatting, so it is largely irrelevant now that FMP 8 supports practically all formatting, character and paragraph. Hence it is for old version of FMP.

Your only problem is that scripts can't apply the formatting, it needs to be done through the built-in menus.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.