Sign in to follow this  
Followers 0
cyberalau3

Get handle for the "Active" window

5 posts in this topic

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:

Share this post


Link to post
Share on other sites



WingetHandle("[ACTIVE]", "") ??


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0