• 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: Words of Bug in Leopard (Japanese environment)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Words of Bug in Leopard (Japanese environment)


  • Subject: Re: Words of Bug in Leopard (Japanese environment)
  • From: Jon Pugh <email@hidden>
  • Date: Tue, 5 Aug 2008 23:49:32 -0700

At 11:20 PM -0700 8/5/08, Christopher Nebel wrote:
>Basically, don't use "word" elements to process anything other than natural language text.  In your case, you probably want text items breaking on ":".

I think I should plug my SmartString library again:

http://www.seanet.com/~jonpugh/software/SmartString.applescript

With it, you could write this in this simple to understand form:

set aMacAdrStr to (do shell script "ifconfig en0 | grep 'ether'")
tell SmartString
	setString(aMacAdrStr)
	keepBetween("ether ", " ")
	getTokens(":")
end tell

returns:

{"00", "17", "f2", "01", "ce", "96"}

Frankly, it makes string munging easier than grep for us english-like folks.

Jon
 _______________________________________________
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

References: 
 >Words of Bug in Leopard (Japanese environment) (From: Takaaki Naganoya <email@hidden>)
 >Re: Words of Bug in Leopard (Japanese environment) (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Words of Bug in Leopard (Japanese environment)
  • Next by Date: InDesign CS3 export as JPEG - selection only
  • Previous by thread: Re: Words of Bug in Leopard (Japanese environment)
  • Next by thread: Re: Words of Bug in Leopard (Japanese environment)
  • Index(es):
    • Date
    • Thread