Re: Insert clipboard into text
Re: Insert clipboard into text
- Subject: Re: Insert clipboard into text
- From: "Marc K. Myers" <email@hidden>
- Date: Fri, 14 Sep 2001 00:21:08 -0400
- Organization: [very little]
>
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]