Andre Posted August 20, 2004 Share Posted August 20, 2004 Hi,I'm having trouble with :expandcollapse popup;---- ; Variables Declaration ;---- Dim $MaxWindows = 15 Dim $Arr[($MaxWindows +1) * 2] Dim $Counter = 1 Dim $NameOfWindow = "Rekenma"; Change into "Calculator" for English OS ;Dim $NameOfWindow = "classname=SciCalc" Dim $I ; ---------------------------------------------------------------------------- ; Set up our defaults ; ---------------------------------------------------------------------------- AutoItSetOption("WinTitleMatchMode", 4) AutoItSetOption("MustDeclareVars",1) ; ---------------------------------------------------------------------------- ; Script Start ; ---------------------------------------------------------------------------- Run("calc.exe") Run("calc.exe") Run("calc.exe") Sleep(1250) For $I = 1 To $MaxWindows If WinExists($NameOfWindow,"") Then $Arr[$Counter] = WinGetTitle($NameOfWindow,"") $Counter = $Counter + 1 WinSetTitle($NameOfWindow,"", $Counter & "My New Window") $Arr[$Counter] = WinGetTitle($Counter & "My New Window","") $Counter = $Counter + 1 Sleep(500) EndIf Next Sleep(3000) If WinExists($NameOfWindow,"") Then WinSetState($NameOfWindow,"",@SW_SHOW) EndIf For $I = $Counter To 1 Step -2 If $I = 1 Then ExitLoop WinSetTitle($Arr[$I -1] ,"", $Arr[$I-2]) Sleep(125) NextWhen i changeDim $NameOfWindow = "Rekenma" ; Change into "Calculator" for English OStoDim $NameOfWindow = "classname=SciCalc"It Only works for one window, change it back and it works for all the windows.Regards,Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
Developers Jos Posted August 20, 2004 Developers Share Posted August 20, 2004 Andre, With the senario where you use the WindowTitle it works like this: - find the first window startin with "Rekenmachine" - Change the title to something else... - next loop So the next time you search for title "Rekenmachine" it will find the next window since the first one is changed. With the Find Classname senario you find everytime the same window since the classname doesn't change.. only itswindow title.... 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...
Andre Posted August 20, 2004 Author Share Posted August 20, 2004 JdeB, Of cource, a thinking faillure I'm fooling around to make an MSN Messenger Boss Tool Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! 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