flyfisher Posted April 30, 2008 Share Posted April 30, 2008 I am writing a script for a program. I will have 2 windows open for this program and need to refer to them individually. Since they belong to the same program, they all have the same title. Is it possible to name the windows in AutoIt when I run the program? Any solutions is appreciated. Link to comment Share on other sites More sharing options...
flip209 Posted April 30, 2008 Share Posted April 30, 2008 Look that the control functions... au3info will help also... " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
covaks Posted April 30, 2008 Share Posted April 30, 2008 WinSetTitle(). Also, you can refer to them by window handle after that, much easier. opt("WinTitleMatchMode",4) Run("Notepad") WinWaitActive("Untitled - Notepad") $hWnd1 = WinGetHandle("active") WinSetTitle($hWnd1,"","Notepad One") Run("Notepad") WinWaitActive("Untitled - Notepad") $hWnd2 = WinGetHandle("active") WinSetTitle($hWnd2,"","Notepad Two") msgbox(0,"","Moving window one") WinMove($hWnd1,"",5,5,300,200) msgbox(0,"","Moving window two") WinMove($hWnd2,"",5,400,300,200) Link to comment Share on other sites More sharing options...
Developers Jos Posted April 30, 2008 Developers Share Posted April 30, 2008 You can identify windows by using its handle which you can get with : WinGetHandle() SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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