cracker Posted July 30, 2006 Posted July 30, 2006 hello i think i have a simple question and i hope you can help me. my problem is that i want to know which window is active without checking every possible window with winwaitactive .... is it just possible to call a function or something like that an get back the title of the actually active window? thank you a lot
Somerset Posted July 30, 2006 Posted July 30, 2006 hello i think i have a simple question and i hope you can help me.my problem is that i want to know which window is active without checking every possible window with winwaitactive .... is it just possible to call a function or something like that an get back the title of the actually active window?thank you a lot WinActive WinGetState
Moderators SmOke_N Posted July 30, 2006 Moderators Posted July 30, 2006 MsgBox(64, 'Info:', WinGetTitle("")) 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.
Xenobiologist Posted July 30, 2006 Posted July 30, 2006 (edited) Hi, Opt("WinTitleMatchMode",4) Opt("WinSearchChildren",1) MsgBox(0,"", WinGetTitle("active")) or MsgBox(0,'', _WinGetActive()) Func _WinGetActive() $OptWSC = Opt('WinSearchChildren', 1) $aWinList = WinList() For $iCount = 1 To $aWinList[0][0] If $aWinList[$iCount][0] <> '' And WinActive($aWinList[$iCount][0]) Then Opt('WinSearchChildren', $OptWSC) Return $aWinList[$iCount][0] EndIf Next Opt('WinSearchChildren', $OptWSC) Return 0 EndFunc So long, Mega Edited July 30, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Moderators SmOke_N Posted July 30, 2006 Moderators Posted July 30, 2006 Hi, Opt("WinTitleMatchMode",4) Opt("WinSearchChildren",1) MsgBox(0,"", WinGetTitle("active")) or MsgBox(0,'', _WinGetActive()) Func _WinGetActive() $OptWSC = Opt('WinSearchChildren', 1) $aWinList = WinList() For $iCount = 1 To $aWinList[0][0] If $aWinList[$iCount][0] <> '' And WinActive($aWinList[$iCount][0]) Then Opt('WinSearchChildren', $OptWSC) Return $aWinList[$iCount][0] EndIf Next Opt('WinSearchChildren', $OptWSC) Return 0 EndFunc So long, MegaLmao, that looks familiar 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.
Xenobiologist Posted July 30, 2006 Posted July 30, 2006 Yeah, there are some scripts from you in my folder "nice funcs". So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now