Re: Getting the Front Application
Re: Getting the Front Application
- Subject: Re: Getting the Front Application
- From: Mr Tea <email@hidden>
- Date: Mon, 13 Oct 2003 14:14:04 +0100
This from Richard Fairbanks - dated 13/10/03 08:46 am:
>
I want to be able to call a copy/paste script with a key combination (via
>
HotApp), but I need it to work in whatever application I'm working in.
>
>
I've tried using Extra Suites to do a "type key "c" with command", etc., but
>
I've found it to be most unreliable--possibly because it's being called with a
>
key combination. If I could just call the cut and paste menu items, I might
>
have a chance at getting it to work. (OneClick was so great at this sort of
>
thing <sigh>)
iKey (formerly Youpi Key) from www.scriptsoftware.com is a tool favoured by
many former OneClick users. You can use AppleScript to tell it to execute a
menu command or keypress (& much more) in any app.
Shortcuts that you set up in iKey are divided into universal and
application-specific sets. They can be linked together in sequence and
triggered by a hot-key combo, from a menu, at specified times, or with
applescript. It's a doddle to set up universal copy and paste shortcuts you
can use with any app that accepts these commands.
If you add to this an application that gives you global and app-specific
palettes (eg, DragThing) you have a pretty good approximation of the glory
that was OneClick.
>
I tried Paul's FrontApp/FrontAppServer, but all it ever returns is "System
>
Events" (I'm running 10.2.8). Is there any reliable, simple/fast way to get
>
the front application?
Do not attempt to do this from a folder action or the script menu, is a good
start - System Events has a nasty habit of muscling its way to the front
when these options are used.
Otherwise...
tell application "System Events"
set frontApp to name of (every process whose frontmost is true)
end tell
... always works for me.
Nick
pp 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.