Jump to content

handle of multiple windows


Recommended Posts

hi everybody , i'm new to scripting

i used to work with multiple windows (same title)

i use "hotkeyset" to send keys to diffirent windows thru "wingethandle" but i just can use "INSTANCE=1...", "INSTANCE=2" and it is uncomfortable when i switch to another window

can some one help me to get the handle of an active window thru a hot key then i can use hotkeyset to send key to that specific window

i searched for "handle" and found

hwin_1, hwin_2 ...

but i don't know how to use it

thank you

Link to comment
Share on other sites

  • Moderators

WinGetHandle("") ... (note the quotes) will get the handle of the active window.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

hi everybody , i'm new to scripting

i used to work with multiple windows (same title)

i use "hotkeyset" to send keys to diffirent windows thru "wingethandle" but i just can use "INSTANCE=1...", "INSTANCE=2" and it is uncomfortable when i switch to another window

can some one help me to get the handle of an active window thru a hot key then i can use hotkeyset to send key to that specific window

i searched for "handle" and found but i don't know how to use it

thank you

For example you can use this type:

HotKeySet("{F10}","_MyFunc")

Func _MyFunc()
If WinActive("Name of GUI") = 1 Then
...
CODE
...
EndIf
EndFunc

When the words fail... music speaks.

Link to comment
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
 Share

  • Recently Browsing   0 members

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