monochrome90 Posted October 25, 2007 Posted October 25, 2007 (edited) My current script is Run("Setup.exe") If WinWaitActive ("title") Then Send ("{DOWN}") But what should i do if title is variable (depending on regional language)? there could be title1 and title 2 (for example).... Edited October 25, 2007 by monochrome90
Nevin Posted October 25, 2007 Posted October 25, 2007 Can you use the the internal window classname in your situation? Like this. WinWaitActive("[CLASS:Notepad]", "")
monochrome90 Posted October 25, 2007 Author Posted October 25, 2007 (edited) yes! in that case my script would be Run("Setup.exe") WinWaitActive ("title", "") Send ("{DOWN}") but title still is wariable... Edited October 25, 2007 by monochrome90
weaponx Posted October 25, 2007 Posted October 25, 2007 ProcessGetHWnd is a UDF I made once for issues like this. It can return HWnds forall of the process' windows or it can return a single one. You can also specify a titleto match.http://www.autoitscript.com/forum/index.ph...handle++processThe UDF:http://www.autoitscript.com/fileman/users/Helge/udfs/_ProcessGetHWnd.au3
monochrome90 Posted October 25, 2007 Author Posted October 25, 2007 didn't understand anything of that UDF...
weaponx Posted October 25, 2007 Posted October 25, 2007 (edited) Easy stuff: #include "_ProcessGetHWnd.au3" $Pid = Run("notepad.exe") $hwndArray = _ProcessGetHWnd($Pid, 2) WinWaitActive($hwndArray[1][1]) WinSetTitle ($hwndArray[1][1], "", "NOTEPAD BEEEEYOTCH!" ) This is good for when you don't know the classname. Edited October 25, 2007 by weaponx
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