John, you don't appear to have mentioned which OS version you're
running. If it's Tiger (or possibly even Panther), have you tried the
approach that both Luther and I suggested in this thread - and that
Chris Nebel also mentioned in the recent "frontmost application"
path to frontmost application
Thanks, that's easy and works fine to get the app. (I use Tiger)
What I really want is to copy the current selection from that app.
System Events is not working for me. Same results even if I convert
from a path string to the process name alone. What am I doing wrong?
set myapp to (path to frontmost application as string) -- NOTE:
only works as scpt (not as app)
set myapp to find text ":([^.:]+)\\." in myapp using "\\1" with
regexp and string result -- Convert path to name.
tell application myapp to activate
tell application "System Events"
tell process myapp
keystroke "c" using command down
tell application myapp
set mytext to the clipboard
display dialog mytext & return & myapp
Either of my earlier suggestions (scpt or app) work fine for me
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