Re: Find Insertion Point
Re: Find Insertion Point
Den 00-12-16 18.31, skrev "Marc K. Myers" <email@hidden>:
>
Paul Berkowitz wrote:
>
> Date: Thu, 14 Dec 2000 19:46:30 -0800
>
> Subject: Find Insertion Point
>
> From: Paul Berkowitz <email@hidden>
>
> To: Applescript-Users <email@hidden>
>
> Cc: "Christopher C. Stone" <email@hidden>
>
>
>
> Does anyone know if it's possible to get the "coordinates" of the insertion
>
> point in an MS Word document? If you know a way in some other app that
>
> supports the Text Suite, I'll give it a go here. I want to find a location
>
> that way that I can later use to insert text at that location.
>
>
I don't have MS word, but in Tex-Edit Plus you can say:
>
>
set x to the insertion point of window 1
>
>
It returns the offset in characters. So, while you can't copy anything
>
directly to the insertion point, you can accomplish the same thing by saying:
>
>
tell application "Tex-Edit Plus"
>
activate
>
set x to the insertion point of window 1
>
copy "Hello!" to after character x of window 1
>
end tell
>
>
I hope this will help.
>
>
Marc [12/16/00 12:31:01 PM]
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
Hi,
I have the same problem, sort of...
I have a script that checks for files in a folder and when get the filenames
abd paste them into a document.
The problem I have is that I got no linebreaks, the filenames is pasted in a
row. How do I get linebreaks?
Ex.
File_1 File_2 File_3
I would like to have it like this:
File_1
File_2
File_3
The script:
tell application "Tex-Edit Plus"
activate
make new document
end tell
tell application "Finder"
activate
set searchFolder to alias "Macintosh HD:Letar:"
set destfolder to alias "Macintosh HD:Klara letar:"
set myList to list folder searchFolder without invisibles
repeat with myfilename in every item in myList
set myfile to alias ("Macintosh HD:Letar:" & myfilename)
select file ("Macintosh HD:Letar:" & myfilename)
activate
copy
tell application "Tex-Edit Plus"
activate
paste selection
move myfile to destfolder
end tell
end repeat
end tell
Any thoughts?