Re: Return character
Re: Return character
- Subject: Re: Return character
- From: Arthur J Knapp <email@hidden>
- Date: Thu, 18 Oct 2001 13:45:58 -0400
>
From: email@hidden
>
Date: Thu, 18 Oct 2001 17:06:09 +0200
>
Subject: Return character
>
How do I convert AppleScript return (unix ascii 13?) to HyperCard (classic
>
app ascii 10 and ascii 13) return.
Assuming you mean "search and replace" Ascii 13 with Ascii 13 & 10:
property kMacReturn : return
property kUnxReturn : ASCII character 10
property kWinReturn : kMacReturn & kUnxReturn
set myString to "Hello
World"
SearchReplace(myString, kMacReturn, kWinReturn)
-- > "Hello\r\nWorld"
on SearchReplace(main_string, find_string, replace_string) -- case-sensitive
set oldDelim to text item delimiters
set text item delimiters to find_string
set main_string to text items of main_string
set text item delimiters to replace_string
set main_string to main_string as string
set text item delimiters to oldDelim
return main_string
end SearchReplace
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://www.zavatone.com/