• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why won't it paste?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Why won't it paste?
      • From: Ken Brooks <email@hidden>
References: 
 >Why won't it paste? (From: Ken Brooks <email@hidden>)

  • Prev by Date: [ANN] MathWallah v1.0
  • Next by Date: Re: [ANN] MathWallah v1.0
  • Previous by thread: Why won't it paste?
  • Next by thread: Re: Why won't it paste?
  • Index(es):
    • Date
    • Thread