RE: Simple text - one more problem
RE: Simple text - one more problem
- Subject: RE: Simple text - one more problem
- From: "Script2" <email@hidden>
- Date: Wed, 9 Jul 2008 16:36:53 -0400
- Importance: Normal
Thanks,
I will try it again.
Ruby
-----Original Message-----
From: applescript-users-bounces+script2=email@hidden
[mailto:applescript-users-bounces+script2=email@hidden]
On Behalf Of Stockly, Ed
Sent: Wednesday, July 09, 2008 3:30 PM
To: email@hidden
Subject: Re: Simple text - one more problem
> I have no control on the body of text; it could have any special
> characters or both slashes \ /.
>>michelle>>The forward slash is no problem, but the backslash has a defined
meaning. Can you get the party that is responsible for creating the text
to
either not use the backslash or to always double it? If you can't get
them to
do that, you will probably have to use another tool instead of Applescript.
It shouldn't work like that, and OMM (tiger) it doesn't.
The backslash functions as an escape character in variables and text you
include in your script, but in text read from a file or pulled in from an
application it is just another character and AppleScript gives it no special
treatment.
To test, I just put this
ABC\\DE\F//g\"
into a bbEdit doc, and
Ran this script:
tell application "BBEdit"
set myText to text of window 1
end tell
set myText to every character of myText as text
tell application "BBEdit"
make new window at beginning
set text of window 1 to myText
end tell
And the new doc was identical to original.
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
tern.com
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
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