[OS X TeX] Selecting Textual Part of a Line wo Carriage Return

Alain Schremmer schremmer.alain at gmail.com
Wed Aug 4 15:27:01 EDT 2010

On Aug 3, 2010, at 8:16 PM, Claus Gerhardt wrote:

> -- Applescript direct
> tell application "TeXShop"
> 	activate
> 	get the clipboard
> 	set theText to result
> 	set n to (number of characters of theText)
> 	set theText1 to (characters 1 thru (n - 1) of theText) as string
> 	set the clipboard to theText1
> 	tell application "System Events"
> 		tell process "TeXShop"
> 			keystroke "v" using command down
> 			--keystroke (ASCII character 127)
> 		end tell
> 	end tell
> end tell

It works very, very nicely: I attached Shift-Command-v to the macro  
and now the routine is:

(1)	Triple-click anywhere on the line of the text to be copied,
(2)	Command c
(3)	Shift-Command-v
(4)	Click anywhere to the right of the text to be completed by the  
text just copied
(5)	Command-v

I am now working on my speed: left hand hovering over the lower left  
part of the keyboard, thumb over Command, little finger over Shift,  
index between c and v and what's nice is that I don't have to aim  
that closely with the mouse moving between the two files.

Almost as good as if there were an Option-triple-click.

Very grateful regards

More information about the MacOSX-TeX mailing list