Re: Reformatting a string
Re: Reformatting a string
- Subject: Re: Reformatting a string
- From: Shane Stanley <email@hidden>
- Date: Sat, 28 Jan 2012 09:42:45 +1100
On 28/01/2012, at 8:02 AM, KOENIG Yvan wrote:
Just that when I don't know the exact contents of strings to treat, I choose the code supposed to be able to treat every case. Old habit of an inhabitant of a country using several non ASCII characters.
A good thing too.
In the interests of variety, speed and, dare I prompt an argument, legibility, here's another version:
script capNStuff set x to current application's NSApp's convertedValue() set x to x's componentsSeparatedByString_(":") set x to x's componentsJoinedByString_("") set x to x's uppercaseString() end script
set the clipboard to "a2:fh:2f:vv:i1:q1:For:Yvan:KÅ’NIG" tell application "ASObjC Runner" to set the clipboard to (run the script {capNStuff} converting (get the clipboard as text) with result returned)
|
_______________________________________________
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