Sign in to follow this  
Followers 0
MerkurAlex

check if gui is moved

3 posts in this topic

i want to check if one gui is moved and when its set somewhere another gui moves right next to it not sure how to though...


[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Share this post


Link to post
Share on other sites



Hi there,

Just a little scratch, you need to create the notepads windows or replace with others:

#include <Array.au3>

Dim $test, $test2

$test = WinGetPos ( "teste.txt - Notepad" )
MsgBox(0, "teste", "move now Notepad window then click OK")
$test2 = WinGetPos ( "teste.txt - Notepad" )


Select
    case $test[1] <> $test2[1] or $test[2] <> $test2[2]
        MsgBox(0, "teste", "Notepad moved")
        WinMove("teste2.txt - Notepad","", $test2[1], $test2[2])
    case else
        MsgBox(0, "teste", "Notepad same coords")
EndSelect

Cheers


Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

$Main = GUICreate("Main",400,100)
GUISetState()

$Pos = WinGetPos($Main)

$Child = GUICreate("Child",200,100,$Pos[0]+200,$Pos[1]+130,-1,-1,$Main)
GUISetState()



While 1
    
    $Pos1 = WinGetPos($Main)
    If $Pos1[0]*$Pos1[1] <> $Pos[0]*$Pos[1] Then
        $Pos = WinGetPos($Main)
        WinMove($Child,"",$Pos[0]+200,$Pos[1]+130)
    EndIf
    
WEnd

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  
Followers 0