dbTalk Databases Forums  

Formatting text

comp.databases.filemaker comp.databases.filemaker


Discuss Formatting text in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Buckbuck
 
Posts: n/a

Default Formatting text - 08-03-2010 , 03:59 PM






FM8.5

Is it possible to creat a script that will automate font and size
formatting of all the contents in a field. I copy and paste info from
websites and I need to reformat all to keep some consistency in the
appearance of my data. I am thinking of a button. Paste grab into a
field, press the button and all is 10 pt Verdana, black.

Thanks
Matthew

Reply With Quote
  #2  
Old   
Lynn Allen
 
Posts: n/a

Default Re: Formatting textX-TraceApproved - 08-03-2010 , 07:36 PM






On 2010-08-03 13:59:46 -0700, Buckbuck <buck.matthew74 (AT) yahoo (DOT) com> said:

Quote:
Is it possible to creat a script that will automate font and size
formatting of all the contents in a field. I copy and paste info from
websites and I need to reformat all to keep some consistency in the
appearance of my data. I am thinking of a button. Paste grab into a
field, press the button and all is 10 pt Verdana, black.
Yes, use SetField and the TextStyleRemove () functions. It will remove
all styles and the text will be the default of the field.

The Help has all the syntax you need, and listings of the available
functions and script steps.
--
Lynn Allen
--
www.semiotics.com
Member FBA
FM 10 Certified Developer

Reply With Quote
  #3  
Old   
Your Name
 
Posts: n/a

Default Re: Formatting text - 08-04-2010 , 01:29 AM



"Lynn Allen" <lynn (AT) NOT-semiotics (DOT) com> wrote

Quote:
On 2010-08-03 13:59:46 -0700, Buckbuck <buck.matthew74 (AT) yahoo (DOT) com> said:

Is it possible to creat a script that will automate font and size
formatting of all the contents in a field. I copy and paste info from
websites and I need to reformat all to keep some consistency in the
appearance of my data. I am thinking of a button. Paste grab into a
field, press the button and all is 10 pt Verdana, black.

Yes, use SetField and the TextStyleRemove () functions. It will remove
all styles and the text will be the default of the field.

The Help has all the syntax you need, and listings of the available
functions and script steps.
I've never tried it, but I seem to vaguely recall reading that you can use
one of the modifier keys when doing a paste (e.g. Option paste or Ctrl
paste) that would mean only the plain text is pasted rather than the
formatted text. Once you get used to it it would negate the need for a
separate Script of button click.

Helpfull Harry )

Reply With Quote
  #4  
Old   
Your Name
 
Posts: n/a

Default Re: Formatting text - 08-04-2010 , 01:32 AM



"Your Name" <your.name (AT) isp (DOT) com> wrote

Quote:
"Lynn Allen" <lynn (AT) NOT-semiotics (DOT) com> wrote in message
news:4c58b5f7 (AT) news (DOT) bnb-lp.com...
On 2010-08-03 13:59:46 -0700, Buckbuck <buck.matthew74 (AT) yahoo (DOT) com> said:

Is it possible to creat a script that will automate font and size
formatting of all the contents in a field. I copy and paste info from
websites and I need to reformat all to keep some consistency in the
appearance of my data. I am thinking of a button. Paste grab into a
field, press the button and all is 10 pt Verdana, black.

Yes, use SetField and the TextStyleRemove () functions. It will remove
all styles and the text will be the default of the field.

The Help has all the syntax you need, and listings of the available
functions and script steps.

I've never tried it, but I seem to vaguely recall reading that you can use
one of the modifier keys when doing a paste (e.g. Option paste or Ctrl
paste) that would mean only the plain text is pasted rather than the
formatted text. Once you get used to it it would negate the need for a
separate Script of button click.

Another way is to paste the text into a Global Field and then have the
Script / button simply use the Set Field command to copy that across to the
current record's normal Text Field.
i.e. Set Field [NormalText; g_GlobalText]


Helpfull Harry )

Reply With Quote
  #5  
Old   
Buckbuck
 
Posts: n/a

Default Re: Formatting text - 08-04-2010 , 03:37 PM



On Aug 3, 11:32*pm, "Your Name" <your.n... (AT) isp (DOT) com> wrote:
Quote:
"Your Name" <your.n... (AT) isp (DOT) com> wrote in message

news:i3b175$6k5$1 (AT) lust (DOT) ihug.co.nz...







"Lynn Allen" <l... (AT) NOT-semiotics (DOT) com> wrote in message
news:4c58b5f7 (AT) news (DOT) bnb-lp.com...
On 2010-08-03 13:59:46 -0700, Buckbuck <buck.matthe... (AT) yahoo (DOT) com> said:

Is it possible to creat a script that will automate font and size
formatting of all the contents in a field. I copy and paste info from
websites and I need to reformat all to keep some consistency in the
appearance of my data. I am thinking of a button. Paste grab into a
field, press the button and all is 10 pt Verdana, black.

Yes, use SetField and the TextStyleRemove () functions. It will remove
all styles and the text will be the default of the field.

The Help has all the syntax you need, and listings of the available
functions and script steps.

I've never tried it, but I seem to vaguely recall reading that you can use
one of the modifier keys when doing a paste (e.g. Option paste or Ctrl
paste) that would mean only the plain text is pasted rather than the
formatted text. Once you get used to it it would negate the need for a
separate Script of button click.

Another way is to paste the text into a Global Field and then have the
Script / button simply use the Set Field command to copy that across to the
current record's normal Text Field.
i.e. * Set Field [NormalText; g_GlobalText]

Helpfull Harry * )
Presumably that would copy into all the records in the table.

Matthew

Reply With Quote
  #6  
Old   
Your Name
 
Posts: n/a

Default Re: Formatting text - 08-04-2010 , 04:40 PM



"Buckbuck" <buck.matthew74 (AT) yahoo (DOT) com> wrote

Quote:
On Aug 3, 11:32 pm, "Your Name" <your.n... (AT) isp (DOT) com> wrote:

Another way is to paste the text into a Global Field and then have the
Script / button simply use the Set Field command to copy that across to
the
current record's normal Text Field.
i.e. Set Field [NormalText; g_GlobalText]

Presumably that would copy into all the records in the table.
Nope. Most Script commands only work on the current record (or the first
related record).

Set Field will only change the data in the current record's NormalText
Field. To change the Field for all records in the Found Set you would have
to use the Replace command instead.

Set Field [Relationship::Field1; Field2] would change only the data in the
Field1 of the first Related record. To change the data in Field1 of all the
Related records it's usually best to use a looping Script.

Helpfull Harry )

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.