
Maximizing a Minimized Application
WshShell.AppActivate to activate the application
WshShell.SendKeys to send Alt, <space> X
'Begin code
'This works on a running, minimized instance of Calculator
Dim WshShell
set WshShell = CreateObject("WScript.Shell")
WshShell.AppActivate "Calculator"
WScript.Sleep 100
WshShell.SendKeys "%"
WScript.Sleep 500
WshShell.SendKeys Chr(32)
WScript.Sleep 500
'Calculator does not support the X when minimized. Replace R with X for apps that do.
WshShell.SendKeys "R"
--
Regards,
Doug Knox, Microsoft MVPDTS
No support provided by e-mail! Reply to the newsgroups only!
* Help us help YOU - http://members.home.com/dts-l/goodpost.htm
--
The Microsoft MVP Program does not constitute employment or contractual
obligation with Microsoft Corporation. We do this for fun! :)
--
Visit my web site for Win95/98 Tweaks, Tips and Utilities
http://members.xoom.com/dbknox/registry/index.htm
Quote:
> How would you use WSH to maximize a minimized application that minimizes to
> the system tray? I've tried using AppActivate but it only works if an
> application is hidden, not minimized. TIA
> Keith