Enforcer Posted May 12, 2013 Share Posted May 12, 2013 Hello everyone, I've got a problem when i runing this script - somehow the second window is not moving... I don't know why, can any one help ? script is runing program and trying to sort windows on the desktop... expandcollapse popup; СОРТИРУЕМ ОКНА... ;#NoTrayIcon #RequireAdmin #include <Constants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <Misc.au3> #include <WinAPI.au3> #include <File.au3> #include <EditConstants.au3> #include <GUIConstants.au3> #include <Date.au3> #include <String.au3> #include <Inet.au3> #include <Misc.au3> Global $NM = 0, $YO = 1 Global $shirina = 201 Global $visota = 200 Global $otstup = 20 $go = _FileCountLines('Looky.ips') for $i=0 to $go-1 Step 1 Run("Looky.exe") WinWait("BiT-Looky-"&$i) sleep(2000) Next WinWait("BiT-Looky-"&$go-1) ;MsgBox(0,"","go") if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+10, 5) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina+10, 5) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*2+10, 5) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*3+10, 5) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*4+10, 5) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*5+10, 5) $NM = $NM + 1 endif ;~ ;;;;;;;; if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+10, 5+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina+10, 5+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*2+10, 5+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*3+10, 5+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*4+10, 5+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*5+10, 5+$visota) $NM = $NM + 1 endif ;~ ;;;;;;;; if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+10, 5+$visota+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina+10, 5+$visota+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*2+10, 5+$visota+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*3+10, 5+$visota+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*4+10, 5+$visota+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*5+10, 5+$visota+$visota) $NM = $NM + 1 endif ;~ ;;;;;;;; if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+10, 5+$visota+$visota+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina+10, 5+$visota+$visota+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*2+10, 5+$visota+$visota+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*3+10, 5+$visota+$visota+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*4+10, 5+$visota+$visota+$visota) $NM = $NM + 1 endif if WinExists("BiT-Looky-"&$NM) then WinMove("BiT-Looky-"&$NM, "", $otstup+$shirina*5+10, 5+$visota+$visota+$visota) $NM = $NM + 1 endif ;WinMove("BiT-Looky-1", "", $otstup+$shirina+10, 5) [RU] Zone Link to comment Share on other sites More sharing options...
Developers Jos Posted May 12, 2013 Developers Share Posted May 12, 2013 What is the exact info that AU3Info gives about the first open window, so we can see what might be the issue? PS, your script could be much shorter when you do the moving/testing also in a for...next loop. Jos 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...
Enforcer Posted May 13, 2013 Author Share Posted May 13, 2013 (edited) It shows this: http://i.pixs.ru/storage/6/1/1/infopng_9791996_7956611.png I know that it can be shorter, but I dodn't programed for a long time and forgot almost everything... = And right now our company need printer monitoring system that i trying to make and the only problem right now is to sort windows on the screen Edited May 13, 2013 by Enforcer [RU] Zone Link to comment Share on other sites More sharing options...
Enforcer Posted May 13, 2013 Author Share Posted May 13, 2013 noone knows whats the problem ? [RU] Zone Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 13, 2013 Moderators Share Posted May 13, 2013 Enforcer, please do not bump your threads without waiting at least 24 hours. That gives us a chance to look over your issue and assist "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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