Re: Determining whether the Word window is minimized
- From: "Larry" <larry328NOSPAM@xxxxxxx>
- Date: Sat, 16 Jul 2005 01:05:01 -0400
This script already restores and activates a minimized window. That's
not what I was asking for. What I want is one simple step: to be able
to find out if the window is minimized.
Thanks.
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@xxxxxxxxx> wrote in message
news:ugsMfmViFHA.3672@xxxxxxxxxxxxxxxxxxxxxxx
> Larry wrote:
>
> > Gary Terhune created this handy vbs code for me a while back. It
> > activates the already open (but not activated) Word window. I run
it
> > with a Winkey combo and it works fine, though there is a slight
pause
> > (which I can probably address with more memory). .
> >
> > However, I'm wondering if I might also speed it up by checking to
see
> > ifWord is minimized, and then only run the SendKeys statement if the
> > window is minimized. That might help the code work faster. So how
> > would I determine if Word is minimized?
> >
> >
> > Option Explicit
> >
> > dim w
> >
> > With WScript.CreateObject("WScript.Shell")
> > w = .AppActivate("Microsoft Word")
> > ' restores Word if Word is minimized
> > .SendKeys ("% r")
> > End With
> >
> Hi,
>
> For a solution that works better, you could use AutoItX and it's
> WinActivate method instead, it is able to restore and activate a
> window even if it minimized.
>
> AutoIt/AutoItX
> http://www.hiddensoft.com/autoit3/index.php
>
> AutoItX.dll is an ActiveX control version of AutoIt and
> can be used from e.g. VBScript/Jscript.
>
> An example:
>
> '--------------------8<----------------------
> Set oAutoIt = CreateObject("AutoItX.Control")
> oAutoIt.SetTitleMatchMode 2
>
> oAutoIt.WinActivate "Some title here", "Maybe some text here"
> oAutoIt.Send "something" ' Send is AutoItX's SendKeys command
>
> '--------------------8<----------------------
>
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx
.
- Follow-Ups:
- Re: Determining whether the Word window is minimized
- From: Torgeir Bakken \(MVP\)
- Re: Determining whether the Word window is minimized
- References:
- Determining whether the Word window is minimized
- From: Larry
- Re: Determining whether the Word window is minimized
- From: Torgeir Bakken \(MVP\)
- Determining whether the Word window is minimized
- Prev by Date: Change permission remotely
- Next by Date: Difference Between Two Pages
- Previous by thread: Re: Determining whether the Word window is minimized
- Next by thread: Re: Determining whether the Word window is minimized
- Index(es):
Relevant Pages
|
Loading