• 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: Luther Fuller <email@hidden>
  • Date: Tue, 23 Oct 2012 07:32:26 -0500

On Oct 22, 2012, at 5:38 PM, John C. Welch wrote:

Okay, so I swear this used to work better, or maybe I'm crazy.
I have a string:

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

I want to strip out the stuff that isn't spaces. Should be easy. Set TIDs
to " ", and get every text item.

So, what's the problem with this code ...

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

set AppleScript's text item delimiters to {space}
set itemList to text items of x
set AppleScript's text item delimiters to {""}
set theText to itemList as text

log theText --> 800xffffff7f815920000x410000x41000com.apple.kec.corecrypto(1.0)

It works on 10.6.8. No need for a repeat loop. You don't have to save the previous TID; You DO have to use a TID after setting it (and before calling a handler which may change the TIDs).



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

  • Prev by Date: Re: TID & text items issue
  • 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