Re: AsciiReplacement
Re: AsciiReplacement
- Subject: Re: AsciiReplacement
- From: Shane Stanley <email@hidden>
- Date: Tue, 20 Aug 2013 13:30:53 +1000
On 20/08/2013, at 1:23 PM, DigitEL @ Shaw <email@hidden> wrote:
> Summer Greetings
It's winter here...
>
> I have been trying to do a concatenated replacement to replace the ascii 13 returns in a text file with (ascii 13 & ascii 10) as a single string and the script indicates it is generating the '\r' and '\n' characters but no matter what I try to do in the final result I get a single ascii 10, two ascii 10's, or a single ascii 13.
> I know this is asking for a bit of self-brain surgery as far as scripting goes but it must be possible, or is it?
on returnsToCRLF(someText)
set saveTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to {return}
set aList to text items of someText
set AppleScript's text item delimiters to {return & linefeed}
set aList to aList as text
set AppleScript's text item delimiters to saveTID
return aList
end returnsToCRLF
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
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