FireLordZi Posted January 17, 2008 Share Posted January 17, 2008 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? While Alive() { DrinkWine(); }AutoIt Programmer Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 18, 2008 Share Posted January 18, 2008 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? Provide example code. What do you mean "move" an image. Whatever it is just use controlgetpos then save it to a file. Link to comment Share on other sites More sharing options...
FireLordZi Posted January 18, 2008 Author Share Posted January 18, 2008 $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 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 18, 2008 Share Posted January 18, 2008 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. Link to comment Share on other sites More sharing options...
Richard Robertson Posted January 18, 2008 Share Posted January 18, 2008 Virtual key 1 is left mouse click. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 18, 2008 Share Posted January 18, 2008 (edited) Virtual key 1 is left mouse click.O really? Hmmm weird. Thought it was 01 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 January 18, 2008 by Thatsgreat2345 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now