Jump to content
Sign in to follow this  
cyberalau3

Get handle for the "Active" window

Recommended Posts

cyberalau3

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
cyberalau3

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
cyberalau3

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
JLogan3o13

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!

How to get your question answered on this forum!

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  

×