Jump to content

about titles & "automation"


Recommended Posts

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

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

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

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 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

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...