zutto Posted July 7, 2008 Share Posted July 7, 2008 yerr.. some sample script for me what tracks wich window is currently active and records it for later use muttley OR some listboxguithing where you can select what window to use later i tried: $handle = WinExists("[ACTIVE]", "") If @error Then MsgBox(4096, "Error", "Could not find the correct window") Else ; Send some text directly to this window's edit control msgbox(1, $handle, $handle) EndIf and replacing [ACTIVE] with last but it only returns 1 ;/ Link to comment Share on other sites More sharing options...
martin Posted July 7, 2008 Share Posted July 7, 2008 yerr.. some sample script for me what tracks wich window is currently active and records it for later use muttley OR some listboxguithing where you can select what window to use later i tried: $handle = WinExists("[ACTIVE]", "") If @error Then MsgBox(4096, "Error", "Could not find the correct window") Else ; Send some text directly to this window's edit control msgbox(1, $handle, $handle) EndIf and replacing [ACTIVE] with last but it only returns 1 ;/ $handle = WinGetTitle("") or $handle = WinGetTitle("[active]") gets the currently active window. See the help for WinGetTitle. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
FreeFry Posted July 7, 2008 Share Posted July 7, 2008 Note that [ACTIVE], and [LAST] are advanced title mode only, ie. Opt("WinTitleMatchMode", 4) is needed before using them. Link to comment Share on other sites More sharing options...
zfisherdrums Posted July 7, 2008 Share Posted July 7, 2008 Note that [ACTIVE], and [LAST] are advanced title mode only, ie. Opt("WinTitleMatchMode", 4) is needed before using them.I didn't know that it was a function of the WinTitleMatchMode. Does AutoIt implicitly re-set that option if an advanced keyword is used in a WinXXXX function? I would expect the following to fail. Opt( "WinTitleMatchMode", 1 ) WinActivate( "AutoIt Help" ) Sleep( 3000 ); While sleeping, I set focus to SciTE editor ConsoleWrite( "LAST: " & WinGetTitle( "[LAST]" ) & @CRLF) ConsoleWrite( "ACTIVE: " & WinGetTitle( "[ACTIVE]" ) & @CRLF) ConsoleWrite( "WinTitleMatchMode: " & Opt( "WinTitleMatchMode" ) & @CRLF) produces: LAST: AutoIt Help ACTIVE: C:\Documents and Settings\Fisherz.AGLA\Desktop\test.au3 - SciTE [2 of 2] WinTitleMatchMode: 1 Identify .NET controls by their design time namesLazyReader© could have read all this for you. Unit Testing for AutoItFolder WatcherWord Doc ComparisonThis here blog... Link to comment Share on other sites More sharing options...
martin Posted July 7, 2008 Share Posted July 7, 2008 (edited) I didn't know that it was a function of the WinTitleMatchMode. Does AutoIt implicitly re-set that option if an advanced keyword is used in a WinXXXX function? I would expect the following to fail. Opt( "WinTitleMatchMode", 1 ) WinActivate( "AutoIt Help" ) Sleep( 3000 ); While sleeping, I set focus to SciTE editor ConsoleWrite( "LAST: " & WinGetTitle( "[LAST]" ) & @CRLF) ConsoleWrite( "ACTIVE: " & WinGetTitle( "[ACTIVE]" ) & @CRLF) ConsoleWrite( "WinTitleMatchMode: " & Opt( "WinTitleMatchMode" ) & @CRLF) produces: LAST: AutoIt Help ACTIVE: C:\Documents and Settings\Fisherz.AGLA\Desktop\test.au3 - SciTE [2 of 2] WinTitleMatchMode: 1 FreeFry is not corect here. From the help Mode 4 (Kept for backward compatibility) Advanced mode Must be replaced with Advanced Window Descriptions which does not need any mode to be set. Edited July 7, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
FreeFry Posted July 8, 2008 Share Posted July 8, 2008 FreeFry is not corect here. From the help muttleyWhen was this behavior added/changed? Link to comment Share on other sites More sharing options...
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