Jump to content
Sign in to follow this  
Enforcer

Problems with script

Recommended Posts

Enforcer

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...

; СОРТИРУЕМ ОКНА...
;#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

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Enforcer

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 by Enforcer

[RU] Zone

Share this post


Link to post
Share on other sites
Enforcer

:  noone knows whats the problem ? :(


[RU] Zone

Share this post


Link to post
Share on other sites
JLogan3o13

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 :)


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×