Jump to content

Recommended Posts

Posted

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
  • Developers
Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...