• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
adding spaces
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

adding spaces


  • Subject: adding spaces
  • From: Natalie Lambert <email@hidden>
  • Date: Mon, 25 Aug 2003 20:15:09 -0700 (PDT)

I'm finding lots of references on triming spaces but
nothing on adding spaces...

I need to take a piece of data and ensure it is a
specific character length. If the number of charaters
are less than those required then I need to fill the
rest with spaces

ie

the space the heading needs to fill is 20 characters
the heading is "Cars"

the script needs to:
set x to count characters of heading
subtract x from 20
add one space for the remainder
--in this case cars + 16 spaces

I know this is going to need a repeat function but I'm
a little unclear on the adding spaces bit since I
haven't scripted in a while.

can anyone help?

thanks
natalie
email@hidden

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: adding spaces
      • From: Michelle Steiner <email@hidden>
    • Re: adding spaces
      • From: Dave Balderstone <email@hidden>
    • Re: adding spaces
      • From: "Bob.Kalbaugh" <email@hidden>
  • Prev by Date: Re: AppleScript and QuarkXPress
  • Next by Date: Re: adding spaces
  • Previous by thread: Re: Auto user login
  • Next by thread: Re: adding spaces
  • Index(es):
    • Date
    • Thread