Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Changing the text color from within a script.


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

Recommended Posts

Posted

Our custom picture department uses different colors for the slide number depending on location of slides.

How I was going to do it was create a field called "itemcolor" and give it a value of 1 to 4, we use 4 colors.

Then I was going to create three more fields called "Slide_green, Slide_blue, Slide_Red" (Slide_num is there already they change the color by hand)and these would be set to that color in the layout. They would be calculations (ie Slide_Green would be (IF itemcolor = 1,slide_num,"") ect..

And place them on top of each other. This is a lot of work because they show up in many layouts.

I really would like to change the text attributes within the field by pressing a button while in that record. Otherwise I will have to make that change to every layout with this field?

Any other solutions/comments would be appreciated.

crazy.gif" border="0

Posted

Your only other option is to copy and paste preformatted text into the field. You could enter number into the field and click a button. The script could test Status(CurrentLayout) and the number entered and go to a library of preformatted colored numbers and assemble a slide number of the correct color in the field. Personally, I'd create a field stack, group it, and copy and paste it to all the layouts. Unless you've got hundreds of layouts, this might be the way to go.

-bd

Posted

I was afraid of that. I only have about 15-20 of them to do, I guess that isn't so bad. Thanx for the input.

Posted

I noticed the post looking for an AppleScript method of changing properties. I think you will find that from a speed and stability standpoint just doing it in FM is the way to go. Also if you ever change or add a platform, you will have to redo the solution with yet another system scripting language. With 20 layouts you will spend longer looking for another solution than just making the changes.

-bd

  • 2 weeks later...
Posted

I did find a workaround. Since the slide department only uses Mac's for Filemaker, I decided to use an applescript in conjuction with Style (Similiar to SimpleText but it is scriptable). I have a combination of Filemaker scripts and Applescript which copies the entire field to the clipboard and then places that sentence into Style, changes the color copies it back to the clipboard and then replaces the text in the field with the colorized text. It works great. The Art department now can just click a button to change the status of the slide instead of having to maneuver around the text attributes menus to do this.

Thanx for all the input.

Thomas Lepkowski

This topic is 8473 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
×
×
  • Create New...

Important Information

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