Re: Why won't it paste?
Re: Why won't it paste?
- Subject: Re: Why won't it paste?
- From: Bill White <email@hidden>
- Date: Mon, 15 Nov 2004 22:49:31 -0500
Title: Re: Why won't it paste?
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:
This email sent to email@hidden