• 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
Re: adding spaces
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding spaces


  • Subject: Re: adding spaces
  • From: email@hidden (michael.slomski)
  • Date: Tue, 26 Aug 2003 08:02:08 +0200

I don't know if it is possible in Applescript to get the first 20 chars of a
text, but if than you can use something of the following meaning.

get the first 20 charactes of (cars & " ")

So how knows something about string operations and can give us the right
sytanx?

Michael


> ----
> set h to "cars"
>
> set nH to padHeading(h)
>
> on padHeading(x)
> set pad to " " -- that's 20 spaces
> set headCount to length of x
> set y to ((length of pad) - headCount)
> set x to (x & (characters 1 thru y) of pad)
> return x
> end padHeading
> ----
>
> Hope that helps.
>
> --
> Bob.Kalbaugh
> _______________________________________________
> 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.
_______________________________________________
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: Clark Goble <email@hidden>
    • Re: adding spaces
      • From: Emmanuel <email@hidden>
    • Re: adding spaces
      • From: John Delacour <email@hidden>
References: 
 >Re: adding spaces (From: "Bob.Kalbaugh" <email@hidden>)

  • Prev by Date: Re: adding spaces
  • Next by Date: Re: adding spaces
  • Previous by thread: Re: adding spaces
  • Next by thread: Re: adding spaces
  • Index(es):
    • Date
    • Thread