6 Replies Latest reply on Sep 9, 2011 9:53 AM by philmodjunk

    Two basic questions

    LewisRobinson

      Title

      Two basic questions

      Post

      How do I get text in an edit field away from the margins by a space or two.  Presently, characters are jammed up against the margin.

      How can I make sure everything put in this field uses a particular font?  (Geneva in this case)

      Kudo's to PhilModJunk who really helped me with my first question and who is taking a deserved Labor Day Weekend off

        • 1. Re: Two basic questions
          Sorbsbuster

          In the Inspector (assuming FM11) go to the Appearance Tab, down to Paragraph, and set the Left indent to be whatever indent you want.

          There may be an easy way to stop the user changing the typeface of entered data, but I can only suggest that you attach a script triggered upon field exit which copies the field and pastes it back into itself, but without style.

          • 2. Re: Two basic questions
            philmodjunk

            How can I make sure everything put in this field uses a particular font?

            Define this auto-enter calculation to strip out all user selected or pasted text formatting:

            TextFormatRemove ( self )

            Then clear the "Do not replace existing values..." check box.

            Now select this field and specify your geneva font for the field while in layout mode.

            There are other text format functions that selectively remove certain text styles and not others when you don't want to remove all user selected text formats.

            • 3. Re: Two basic questions
              LewisRobinson

              Many thanks to Sorbsbuster and PhilModJunk.  I'm almost done writing programs to get the data out of hypercard and into  various filemaker tables and to distribute it to the appropriate fields.  

              I am having one problem with a script written today.  When I try to run it I get a blinking Apple command with an asterisk at the lower right corner.  The only way to shut it off is by quitting Filemaker.  Any ideas? I have no idea what's going on. 

              • 4. Re: Two basic questions
                philmodjunk

                To halt a script in filemaker, hold down the command key and press period. As long as "allow user abort" wasn't used to prevent this option, that should escape the script.

                It sounds like you have an infinite loop. If you have Filemaker advanced, run this script with the debugger enabled and watch the script execute step by step to see what's going on. If you do not have this version, insert some show custom dialog steps at strategic places and watch for them to appear to better understand what's going on.

                And beware of layout setup specified script triggers. It's easy to set up a script with one of them that triggers itself over and over again when it changes layouts, records or modes.

                • 5. Re: Two basic questions
                  LewisRobinson

                  More Kudos to PhilModJunk:  Typical of the poor documentation of the very basic things in fileMaker Pro -- where would you look up a blinking command cursor?  I tried the knowledge base to no avail.  As PhilModJunk suggested, the problem was an infinite loop (caused by transposed letters in one variable).

                   To be fair, Filemaker documentation for things beyond the basics is excellent, and the script editor won't let you make a syntax error.

                  Things are working smoothly.  On to prettying things up and later to portals.  Three of the four stacks are now shifted (in principle).  Each stack requires four scripts.  2 in hypercard (one to suck the relevant data from a card (record), one to write such data from startCard to FinishCard (parameters to be chosen) to and external file, and 2 in Filemaker.  First the external file is put in a special field (called highColonicDataDump).  Then filemaker script #1, puts the  FinishCard - StartCard + 1 number of card datas into the same field in that many new records -- clearly global variables are involved -- 7 in this case.  Filemaker script #2 then goes to a given record and parcels out the data from highColonicDataDump into more appropriately named fields.  

                  Many thanks for the help.  I'm sure I'll be back here

                  • 6. Re: Two basic questions
                    philmodjunk

                    Actually, that blinking cursor itself displays the key to be pressed to abort the script. On my Windows system, I see an Esc that tells me to press Escape. On Macs, (haven't tried this on Lion), you should see the symbol for the command key and a period...