Sign in to follow this  
Followers 0
FireLordZi

Reset Image

6 posts in this topic

After I move an image somewhere on the screen from my GUI how can I tell if it's moved and if it is then it will re-create in it's place? :D


While Alive() {
	 DrinkWine();
}
AutoIt Programmer

Share this post


Link to post
Share on other sites



After I move an image somewhere on the screen from my GUI how can I tell if it's moved and if it is then it will re-create in it's place? :D

Provide example code. What do you mean "move" an image. Whatever it is just use controlgetpos then save it to a file.

Share this post


Link to post
Share on other sites

$calling = GUICreate("", 24, 24, 5, 5,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$hudGUI)
$callingpic = GUICtrlCreatePic(@scriptdir & "\icons\calling.gif", 0, 0, 24, 24)
GUISetState(@SW_SHOW,$calling)

Case $msg = $callingpic
                $gp = WinGetPos($calling)
                $mp = MouseGetPos()
                While _IsPressed("1")
                $cp = MouseGetPos()
                WinMove($calling,'',$gp[0] - $mp[0] + $cp[0],$gp[1] - $mp[1] + $cp[1])
                WEnd

Once it is moved from its position on the GUI how can it detect that and create another one?


While Alive() {
	 DrinkWine();
}
AutoIt Programmer

Share this post


Link to post
Share on other sites

If you posted some what useable code that would be AWESOME. I still have no freaking idea what you are trying to do. In this script you are creating a child GUI on some other GUI. Then creating some picture. You aren't using a loop. But if you were and using select and GUIGetMsg, then you would be seeing if anyone has clicked the picture. Then you are getting the position of the GUI, and the mouse position. Then while some key (which just 1 i don't believe is any key). Then moving the window randomly/resizing.

Share this post


Link to post
Share on other sites

Virtual key 1 is left mouse click.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Virtual key 1 is left mouse click.

O really? Hmmm weird. Thought it was 01 :D not just 1.

But what I believe he is trying to do is create the GUI be resizeable but I'm still confused as all get out. He is all talking about pictures, and then he is talking about moving a GUI I really can't figure it out.

Edited by Thatsgreat2345

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