set theApp to ((path to frontmost application) as text)

tell theApp
     --your code here
end tell

On Feb 5, 11:30 am, Lvood <[email protected]> wrote:
> Hi,
>
> I often hide (many) windows with cmd-m and then have problems to get
> them back by selecting them one by one in the Windows Menu,
> as there is no "maximize all windows" standard command in OS X (or
> have I missed something?).
>
> So I tried to make a simple apple script which does that for me:
>
> tell current application
>         repeat with w in (get every window)
>                 set miniaturized of w to false
>         end repeat
> end tell
>
> My problem:
> If I launch the script via Quicksilver, the current application is
> Quicksilver (and not the last active one).
>
> What can I do to make it work for the "real" current application
> (instead of QS)?
>
> Kind regards
>
> Martin

Reply via email to