You're close.

Dim SVar
set SVar = ActiveWindow
Speak "You are now in " & SVar.Title

You could replace title with name or any of the other Window properties as well.

Remember:
You're setting up an object, so you need the word set on the line where you 
define the variable.


J.J. Meddaugh - ATGuys.com
A premier Licensed Code Factory and KNFB Reader distributor
  ----- Original Message ----- 
  From: David 
  To: gw-scripting@gwmicro.com 
  Sent: Friday, January 15, 2010 12:59 PM
  Subject: Re: Active window - how to


  Guess, I should have been a bit more specific. Sorry, my somehow short 
initial message. What I am trying to figure out, is how to make a script do the 
following:

  Dim SVar

  SVar = GET_ACTIVE_WINDOW
  Speak "You are now in " & SVar

  So, is there some kiind of Get_Active_Window function, that will return the 
Title of the actual active window, at any given time?

  Thanks for all help...




  ....
    ----- Original Message ----- 
    From: David 
    To: Scripting List WE 
    Sent: Friday, January 15, 2010 6:03 PM
    Subject: Active window - how to


    Is there a way for my VBScript, to check which window/application is active 
at any time? 

    Thanks,





----------------------------------------------------------------------------
    I am using the Free version of SPAMfighter.
    We are a community of 6 million users fighting spam.
    SPAMfighter has removed 312 of my spam emails to date.
    The Professional version does not have this message.

Reply via email to