praveenb3

Window redraw

2 posts in this topic

Hi All,

When I use below script, my window is redrawn from position x to position y, but what I need is the actual window drag from position x to position y. Any better ideas?

Same with WinMove command, windows redraws but doens't do actual drag.

 

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
 
Global $hGUI, $idButton, $aMPos
;Creating a window with "Start drag" button
$hGUI = GUICreate("GUI In Drag", 300, 300)
$idButton = GUICtrlCreateButton("START Drag", 50, 50, 200, 200)
GUISetState()
 
;Getting positon of the button
$buttonhwnd = WinGetHandle(ControlGetHandle($hGUI, "", $idButton))
$pos = WinGetPos($buttonhwnd)
 
 
;Move mouse on top of Start Drag button
Sleep(5000)
MouseClickDrag("left", $pos[0] + 100, $pos[1] - 60, 600, 700)

Share this post


Link to post
Share on other sites



Please use code tags, just click on code.png and paste your code ;)

By the drag, you're reffering to the dragging effect, right? (instead of using winmove and the window teleports to another position)


Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.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