Jump to content

Get handle for the "Active" window


Go to solution Solved by cyberalau3,

Recommended Posts

Posted

I have multiple windows (GUICreate) and would like to know if there is a command that will give me the handle of the current window that is active. I couldn't see any command when I tried to research it.

Thanks in advance

cyberal :bye:

Posted

I tried this,

    GUISwitch($winBackupDates)
     local $V = WinGetHandle("[ACTIVE]","$WinBackupDates")
    msgbox(0,@ScriptLineNumber,"$V is: ",$V)
 tried with the "text" part as    local $V = WinGetHandle("[ACTIVE]","")

In both cases $V is always empty

  • Solution
Posted

After reading the help on "WinGetHandle" it seems what it returns is not a normal number or string but rather it's own special type. So, for example,trying to display it in msgbox always shows nothing. I can't use it so will look for a different way to do what I was atempting. Just wanted to close this out.

cyberal

  • Moderators
Posted

I guess it would help to see all of your code. When I create a GUI, then create a sub, and switch between the two with GUISwitch (as it appears you are trying to do), I am able to close the sub by its handle just fine. If that is not what you're attempting, you need to provide a more complete reproducer.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...