• 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: Insert clipboard into text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Insert clipboard into text


  • Subject: Re: Insert clipboard into text
  • From: "Marc K. Myers" <email@hidden>
  • Date: Fri, 14 Sep 2001 00:01:44 -0400
  • Organization: AppleScriptsToGo

> Date: Wed, 12 Sep 2001 17:52:43 -0600
> Subject: Insert clipboard into text.
> From: Rachel Cogent <email@hidden>
> To: "AppleScript (Gnarlodious)" <email@hidden>
>
> I am attempting to insert a CR and the contents of the clipboard into every
> file in the folder.
> Here is an approximation:
>
> tell application "Finder"
> set foo to item 1 of selection
> repeat with bar from 1 to (count files in foo)
> set fileLocation to file bar of foo
> tell window 1 of application "Tex-Edit Plus"
> open fileLocation
> set character 0 of line 6 to return
> set insertion point to character 0 of line 6
> paste
> close window 1 saving no
> end tell
> end repeat
> end tell
>
> What am I doing wrong? I tried everything I could think of.

I think this is what you want:

tell application "Finder"
activate
set foo to item 1 of selection
set thePaste to the clipboard
repeat with bar from 1 to (count files in foo)
set fileLocation to (file bar of foo) as alias
tell application "Tex-Edit Plus"
open fileLocation
tell window 1
set insertion point before line 6 to return & thePaste
close window 1 saving no
end tell
end tell
end repeat
end tell

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[9/14/01 12:00:55 AM]


  • Prev by Date: Container of an app
  • Next by Date: Re: Insert clipboard into text
  • Previous by thread: Re: OT - Your Comments on the recent,,,
  • Next by thread: Re: Insert clipboard into text
  • Index(es):
    • Date
    • Thread