• 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
Reco Label Stringer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reco Label Stringer


  • Subject: Reco Label Stringer
  • From: Andy Wylie <email@hidden>
  • Date: Thu, 25 Apr 2002 18:04:27 +1200

I didn't get any bites with the earlier tease so here's a worker...

----------------
set listA to {frog:"froggie", dog:"fido", cat:"kitty", |cane toad|:"dairy
queen", hamster:"hammy"}
set ick1 to ({listA} as string)
set AppleScript's text item delimiters to {"TEXT"}
set count1 to count listA
set ick2 to ick1's text items 2 thru (count1 * 2)
set AppleScript's text item delimiters to ""

set {strungLabel, shoo} to {{}, (ASCII character 0)}
repeat with n from 1 to (count1 * 2) by 2
tell (ick2's item n)
if (its text item -1) = shoo then
set itsEnd to -2
else
set itsEnd to (its length)
end if
set end of strungLabel to (its text items 5 thru itsEnd as string)
end tell
end repeat

set critter to (choose from list strungLabel)'s item 1

set AppleScript's text item delimiters to {critter}
set thisCritter to ick1's text item -1
set AppleScript's text item delimiters to {"TEXT"}
set count2 to count (thisCritter's text items)
set AppleScript's text item delimiters to ""

set itsName to (listA's every string)'s item (round (count1 - ((count2 / 2)
- 1)) rounding down)
say "hello " & itsName
----------------
--I believe Arthur Knapp knows how to turn a string into a label ;)

_____________________________ Andy
_______________________________________________
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: Reco Label Stringer
      • From: Mr Tea <email@hidden>
References: 
 >Re: Owner/User Name in OSX (From: Arthur J Knapp <email@hidden>)

  • Prev by Date: Re: Beep broken in 10.1.4?
  • Next by Date: Re: Find and Replace Text
  • Previous by thread: Re: Owner/User Name in OSX
  • Next by thread: Re: Reco Label Stringer
  • Index(es):
    • Date
    • Thread