• 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: TID & text items issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TID & text items issue


  • Subject: Re: TID & text items issue
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 23 Oct 2012 01:40:41 -0500

Hey John,

On Oct 22, 2012, at 17:38, John C. Welch <email@hidden> wrote:
Okay, so I swear this used to work better, or maybe I'm crazy.

I think you're quite sane but perhaps dreaming?  :)

Shane pretty well covers it but just for exercise:

Not too pretty but very fast:

------------------------------------------------------------------------------------------------
on textToList(_text)
set {oldTIDS, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {"    ", " "}}
set _list to text items of _text
repeat while item 1 of _list is ""
set _list to rest of _list
end repeat
set _list to reverse of _list
repeat while item 1 of _list is ""
set _list to rest of _list
end repeat
set _list to reverse of _list
set AppleScript's text item delimiters to oldTIDS
return _list
end textToList

set _text to "    8    0 0xffffff7f81592000 0x41000    0x41000 com.apple.kec.corecrypto (1.0) "

textToList(_text)
------------------------------------------------------------------------------------------------

How I would do it on my system with the Satimage.osax:

------------------------------------------------------------------------------------------------
set _src to "    8    0 0xffffff7f81592000 0x41000    0x41000 com.apple.kec.corecrypto (1.0) "

set foundText to find text "[^ ]+" in _src regexp true with all occurrences and string result
------------------------------------------------------------------------------------------------

--
Best Regards,
Chris

 _______________________________________________
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: TID & text items issue
      • From: Shane Stanley <email@hidden>
References: 
 >TID & text items issue (From: "John C. Welch" <email@hidden>)

  • Prev by Date: Re: Problem saving a new file
  • Next by Date: Re: Problem saving a new file
  • Previous by thread: Re: TID & text items issue
  • Next by thread: Re: TID & text items issue
  • Index(es):
    • Date
    • Thread