• 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: another short form
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another short form


  • Subject: Re: another short form
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 9 Sep 2008 06:53:48 -0700

On Sep 9, 2008, at 6:33 AM, Script2 wrote:

I have string of about 70 characters, I want to check if characters 6,9,12,16,19,24 so on is = “-

I assume that "19" is a typo and you meant to type "18".

If character 6 of aname = “-“ (this gets too lengthy.)

 

If character 9 of aname = “-“

Try this for starters:

set a to "ab-cd-efghi-ab-cd-efghi-ab-cd-efghi-ab-cd-efghi-ab-cd-efghi-ab-cd-efghi-90"
repeat with i from 3 to count of a by 3
if character i of a is "-" then
display dialog "character " & i & " is -"
else
display dialog "character " & i & " is not -"
end if
end repeat

You will need to add some error checking to test for an overrun at the end of the string.

-- Michelle

--
Please contribute to the Leukemia and Lymphoma Society, and help me meet my fund raising goal for my marathon training.
<http://www.active.com/donate/tntdms/tntdmsMSteine>




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: another short form
      • From: "Mark J. Reed" <email@hidden>
    • RE: another short form
      • From: "Script2" <email@hidden>
References: 
 >another short form (From: "Script2" <email@hidden>)

  • Prev by Date: Re: another short form
  • Next by Date: Re: how to tell application using psn
  • Previous by thread: Re: another short form
  • Next by thread: RE: another short form
  • Index(es):
    • Date
    • Thread