Sign in to follow this  
Followers 0
Gondus

Getting a window positioin by clicking?

4 posts in this topic

Could someone show me a start, i dont want you guys to tell me completely but would you give me a clue like a command or something, i know about WinGetPos, but how would i get to make that get the area and position by clicking on the window?


-----------Current Programming Language Status:Beginner: J#, Ruby Intermediate: Autoit, Java, C#, C++Advanced: Basic, Visual Basic, Fortran

Share this post


Link to post
Share on other sites



maybe

'

#include<guiconstants.au3>

$GUI = GUICreate("my gui")

$button = GUICtrlCreateButton("Get window location", 120, 150, 150, 30)

GUISetState()


While 1
    
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then Exit
    if $msg = $button Then
        $array = WinGetPos($GUI)
        MsgBox(0,"win position", $array[0] & "= X position" & $array[1] & "= Y position" & @CRLF & _
        $array[2] & "= Width" & $array[3] & "= Height") 
    EndIf
WEnd

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thank You :P


-----------Current Programming Language Status:Beginner: J#, Ruby Intermediate: Autoit, Java, C#, C++Advanced: Basic, Visual Basic, Fortran

Share this post


Link to post
Share on other sites

Thank You :P

Welcome

8)


NEWHeader1.png

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