Re: Selected text from Terminal?
Re: Selected text from Terminal?
- Subject: Re: Selected text from Terminal?
- From: Dave Stewart <email@hidden>
- Date: Mon, 1 Dec 2003 12:33:26 -0800
On Dec 1, 2003, at 12:05 PM, Dennis Cox offered this:
And then Dennis *really* read what Dave posted...
and the answer is simple with UI scripting.
tell app "Terminal"
activate
set oldClip to the clipboard
tell application "System Events" to keystroke "a" using {command
down} --
if you want all the text
tell application "System Events" to keystroke "c" using {command
down}
set tempContents to the clipboard
set the clipboard to oldClip
end tell
May not be the fastest, but it gets it done. Sometimes it's simplest
to use
menu shortcuts with System Events. Just be sure that the correct
program is
active at the time of copying.
Gee Dennis, I think we're onto something here! Thanks!
Dennis
Dave Stewart
Aqua-flo Supply (Goleta)
dstewart at aquaflo dot com
There are 10 kinds of people in the world:
Those who understand binary and those who don't.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.