ljkkda Posted November 2, 2005 Share Posted November 2, 2005 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 Link to comment Share on other sites More sharing options...
ljkkda Posted November 2, 2005 Author Share Posted November 2, 2005 (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 November 2, 2005 by ljkkda Link to comment Share on other sites More sharing options...
poisonkiller Posted November 2, 2005 Share Posted November 2, 2005 In this: $title = WinGetTitle(""") There are 3 quotes. Must be $title = WinGetTitle("") only 2 quotes Link to comment Share on other sites More sharing options...
ljkkda Posted November 2, 2005 Author Share Posted November 2, 2005 (edited) great thx for help Edited November 2, 2005 by ljkkda Link to comment Share on other sites More sharing options...
Nuffilein805 Posted November 2, 2005 Share Posted November 2, 2005 how bout the window-info? much easier when you just want to name the title of a window and don't need it in your prog my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
ljkkda Posted November 2, 2005 Author Share Posted November 2, 2005 i need this because the window change the title again and again... and i need the actual title to minimize or maximize Link to comment Share on other sites More sharing options...
Nuffilein805 Posted November 2, 2005 Share Posted November 2, 2005 lol, isn't there anything that stays as the title changes? e.g. in ie its "- internet explorer" my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
ljkkda Posted November 2, 2005 Author Share Posted November 2, 2005 yes there is something but i dont know how to use this im a very very beginner Link to comment Share on other sites More sharing options...
Nuffilein805 Posted November 2, 2005 Share Posted November 2, 2005 Opt("WinTitleMatchMode", 2);to match any substring in the stringthen you can use everything related to the wintitle should be easy to build a script around this my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
ljkkda Posted November 2, 2005 Author Share Posted November 2, 2005 (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 November 2, 2005 by ljkkda Link to comment Share on other sites More sharing options...
Nuffilein805 Posted November 2, 2005 Share Posted November 2, 2005 try this 1: $a = winlist ("your title") for $i = 1 to $a[0][0] step 1 winsetstate ($a[$i], "", @sw_maximize next this should give you each window with the string in the title and maximize it my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
ljkkda Posted November 2, 2005 Author Share Posted November 2, 2005 ok thx guys now i got it =) very helpfull forum Link to comment Share on other sites More sharing options...
w0uter Posted November 2, 2005 Share Posted November 2, 2005 (edited) http://www.autoitscript.com/autoit3/docs/i...owsadvanced.htm"active" matches the currently active window (same as "" in the default WinTitleMatchMode). Edited November 2, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
CyberSlug Posted November 2, 2005 Share Posted November 2, 2005 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! 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