Re: regexp
Re: regexp
- Subject: Re: regexp
- From: Robert Poland <email@hidden>
- Date: Wed, 7 Sep 2005 08:23:32 -0600
Robert - what are you trying to do exactly? That might help in
figuring out how to best advise. My understanding of Satimage's
"change" command is that it requires string parameters. The first
thing you'll have to do is get whatever it is you want to manipulate
into string format. Right now your script is trying to operate on
two strings and a "bounds". The dictionary for Satimage indicates
that there is some flexibility about the third parameter, but I'm
not sure exactly how flexible it is.
D
On Sep 6, 2005, at 8:50 PM, Robert Poland wrote:
Hi,
The script;
set w to window 2 -- a text window
set bounds of w to {0, 44, 588, 517} -- this line works
change {"^[[:space:]]+", "[[:space:]]+$"} into {"", ""} in w with regexp
gives me the error"Can't make {"^[[:space:]]+",[[:space:]]+$"}into
type string"
What am I doing wrong?
What is the function of the colons?
What form would text take in the find area?
I would appreciate an example of replacing "this" with "that".
Tia,
--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
Daniel,
Originally I was using;
tell application "Tex-Edit Plus"
replace selection looking for " ^c" replacing with
"^c" -- leading space
delay 0.5
replace selection looking for "^c " replacing with
"^c" -- trailing space
delay 0.5
end tell
It was suggested that;
change {"^[[:space:]]+", "[[:space:]]+$"} into {"", ""} in w with regexp
was a better method (no tell block). Which brings us back to the above message.
--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >regexp (From: Robert Poland <email@hidden>) |
| >Re: regexp (From: Daniel Jalkut <email@hidden>) |