RE: Applescript question
RE: Applescript question
- Subject: RE: Applescript question
- From: Dennis Cox <email@hidden>
- Date: Thu, 15 Jun 2006 08:18:37 -0500
> ----------
> From: Steven DeWitt
> Sent: Thursday, June 15, 2006 6:59 AM
>
> Hello,
>
> I am trying to learn some Applescript so I can automate some tasks
> that I do several times a day. To experiment, I tried to create a
> script that would replace all instances of "<text:s/>" with nothing
> in an xml document. But when I try to execute the script on an open
> file, I get the following error message in AppleScript Editor (in
> French, so this is approximate:) "TextWrangler error: "<text:s/>"
> does not include the replace message". My script is below. Can a kind
> soul tell me what I have done wrong? Thanks!
>
> Steven
>
> ----------
> tell application "TextWrangler"
> set searchOptions to {search mode:grep, starting at top:true, wrap
> around:false, reverse:false, case sensitive:false, match words:false,
> extend selection:false}
> activate
>
the next three lines are actually one line, right? The class name of the
search options is "Search Options" but in the replace command just "options"
is used.
> replace "<text:s/>" using ""
> searching in text 1 of text window 1
> Search Options searchOptions
> close text document 1 saving yes
> end tell
>
replace "whatever" using "whatever else" searching in text 1 of text window
1 options searchOptions
If you're interested in learning more about AppleScript, you may want to
join the AppleScript users mailing list.
<http://lists.apple.com/mailman/listinfo/applescript-users>
_______________________________________________
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