Peter (duksis3) Posted October 26, 2009 Posted October 26, 2009 I try to find some solution to change font in all fields in Browse mode but have no success. For several fields Script is OK but for 10 or 20 it's to complicated. I'll be thankful for any idea.
Ocean West Posted October 26, 2009 Posted October 26, 2009 in a script loop thru each field setting a return separated variable: $var = List ( $var ; Get ( ActiveFieldName ) ) or use one of the design functions to get all the fields on the layout - or if the fields objects are named. Then use Set Field By Name to set the field to itself with your desired operation. GetValue ( $var; $i ) if your in a loop and you increment $i to the current iteration You may wish to create a utility layout to perform the operation and only include the desired fields.
Ocean West Posted October 26, 2009 Posted October 26, 2009 if it's a onetime thing, export your data then an import cleaned formatted text could also do the trick.
Peter (duksis3) Posted October 26, 2009 Author Posted October 26, 2009 Thanks! I'm a bit tired from looping But probably there aren't another way.
Peter (duksis3) Posted October 26, 2009 Author Posted October 26, 2009 I wish to write script I use but dismiss Preview and Add Post buttons So- Layout fields Tab order is set and script is: Loop Go to Field (first) Set Field (first); TextFont ( Field (first) ; [color:red]Font ) GoTo Next field [exit after last} End Loop where [color:red]Font is global field with drop down font list and script is triggered from global field.
Peter (duksis3) Posted October 27, 2009 Author Posted October 27, 2009 To solve question some time was spent. Solution is: Make- Global field "[color:red]Font", Global field "[color:green]Size"; Set- Layout field order; Determine- First and [color:blue]Last field names and corresponding Table names; Write script- Go to Field (First) Loop Set Field By Name [Get ( ActiveFieldTableName ) & "::" & Get ( ActiveFieldName ) ; TextFont ( TextSize ( Get ( ActiveFieldContents ); field "[color:green]Size"); Field "[color:red]Font" ; Roman) Exit Loop If Get ( ActiveFieldName ) = "[color:blue]Last field Name" and Get ( ActiveFieldTableName ) = "[color:brown]Last field Table" Go to Next Field End Loop Script can be triggered from fields "[color:green]Size" or "[color:red]Font" or from both or from...
Recommended Posts
This topic is 5606 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 accountSign in
Already have an account? Sign in here.
Sign In Now