Jump to content

Recommended Posts

Posted

hi

how to get the window title of an activ window? i test with

$title = WinGetTitle(""")

bbut it does not wor im using autoit v3

Posted (edited)

i got a error message

$title = WinGetTitle(""")

$title = WinGetTitle(^ ERROR

i used this fron online support

WinGetTitle ( "title" [, "text"] )

i only want to now how can i get the title of an activate window

Edited by ljkkda
Posted (edited)

yes that woks usually but if i have more windows with the same text always ?

so i have tryed this

$window = WinGetTitle("")

MsgBox(0,"",$window)

WinSetState("$window", "" , @SW_MINIMIZE)

WinSetState("$window", "" , @SW_MAXIMIZE)

but it wont minimize or maximize the window !!!!!!

Edited by ljkkda
Posted

If you've matched the window once, grab its handle so you can reference the window again even if its title changes:

(from help file):

; Identify the Notepad window that contains the text "this one" and get a handle to it

; Change into the WinTitleMatchMode that supports classnames and handles
AutoItSetOption("WinTitleMatchMode", 4)

; Get the handle of a notepad window that contains "this one"
$handle = WinGetHandle("classname=Notepad", "this one")
If @error Then
    MsgBox(4096, "Error", "Could not find the correct window")
Else
   ; Send some text directly to this window's edit control
    ControlSend($handle, "", "Edit1", "AbCdE")
EndIf
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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
×
×
  • Create New...