Re: another short form
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.
|
_______________________________________________
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