Re: Why won't it paste?
Re: Why won't it paste?
- Subject: Re: Why won't it paste?
- From: Ken Brooks <email@hidden>
- Date: Tue, 16 Nov 2004 20:45:19 -0500
Title: Re: Why won't it paste?
Thanks, Bill, that was a winner!
Now, where should I have gone to learn that "to end of"
syntax? What other "copy target" syntax options might
I want to know about?
Ken
At 10:49 PM -0500 11/15/04, Bill White wrote:
On 11/15/04 10:16
PM, Ken Brooks <email@hidden> wrote:
In the following script, the
display dialog command shows me that the clipboard was set as
intended. However, no change ever takes place in document 2 (and
I've also tried designating that window by name instead of by number).
Am I seeing a bug in Tex-Edit Plus? Or am I making a
scripting error?
tell application "Tex-Edit Plus"
tell
document 1
set
numParagraphs to (count paragraphs)
set n to 1
repeat while
n ¾ numParagraphs
if
paragraph n contains
"fun" then
select
paragraph n
get
paragraph n as
text
set the clipboard to result
display dialog
(the clipboard)
tell
document 2
to paste
end if
set n to n +
1
end repeat
end
tell
end tell
Ken,
I think the following will do what you're trying to do, without
gooing it up with "paste":
tell
application "Tex-Edit
Plus"
tell
document 1
repeat with n from 1
to count paragraphs
if paragraph n contains "fun" then
copy paragraph
n of document 1 & return
to end of document 2
end if
end repeat
end tell
end tell
--Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
>ight.com
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:
This email sent to email@hidden