Re: select text of document 1 in TextEdit?
Re: select text of document 1 in TextEdit?
- Subject: Re: select text of document 1 in TextEdit?
- From: kai <email@hidden>
- Date: Thu, 3 Aug 2006 21:51:33 +0100
On 3 Aug 2006, at 21:19, Don W Strickland wrote:
tell application "BBEdit"
activate
-- this works in BBEdit but NOT in TextEdit
select text of document 1
copy the selection
end tell
Can you tell me how to do that same thing in TextEdit? I just want
to copy the contents of a TextEdit document to the clipboard in an
AppleScript.
Not an unreasonable request, Don - but one that Cocoa apps don't
generally seem quite ready for at the moment. Until they are, you may
have to resort to System Events to achieve something similar.
(However, it seems unnecessary to enable GUI scripting for this kind
of thing.)
--------
activate application "TextEdit"
tell application "System Events" to keystroke "ac" using command down
--------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden