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

Claus Gerhardt gerhardt at math.uni-heidelberg.de
Wed Aug 4 02:16:23 CEST 2010


Alain,

Use the script below as a Macro to paste the clipboard. It will remove the last character, i.e. the carriage return will be removed.

Claus

-- 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




More information about the macostex-archives mailing list