Jump to content

Align text through script


This topic is 5639 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!"

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 5639 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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