Re: 2nd attempt: copying and pasting
Re: 2nd attempt: copying and pasting
- Subject: Re: 2nd attempt: copying and pasting
- From: Mr Tea <email@hidden>
- Date: Wed, 27 Mar 2002 11:29:45 +0000
This from garrett - dated 27/3/02 07.09 am:
>
In os x:
>
>
I want to highlight some text in a program, doesn't matter which one, then
>
invoke a script from the Apple script menu that will basically perform a
>
command C for copy. Any ideas?
The thing is, Garrett, it *does* matter which programme...
If the app you are directing the copy instruction at doesn't understand it
(ie, doesn't have an AS dictionary containing 'copy' terminology) then no
amount of invoking will make it happen. Similarly, telling an app to 'set
the clipboard to selection of window 1' will be fruitless if the app doesn't
understand script terminology like 'selection' and 'window'.
Additionally, you need to identify in your script which App you are sending
the instruction to. Getting the frontmost application when running a script
from the OS X script menu returns the SystemUIServer, which no use to man
nor beast - so it's very difficult to make a universal menu script that
works with any compliant program.
For earlier OSes there are scripting additions that let you simulate key
strokes (don't know which ones, I used OneClick), but I don't know if any of
these have evolved to survive in the X environment yet.
If you have a specific task that you want to accomplish with specific
applications, post it here for appropriately specific advice.
Mr Tea
--
_______________________________________________
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.