madflame991 Posted January 7, 2009 Share Posted January 7, 2009 Is there any elegant way of doing this?$win = GUICreate('',32,32,....., @layered)$pic = GUICtrlCreatePic(..........)While 1 WinMove($win,'',MouseGetPos(0),MouseGetPos(1)) Sleep(30)WEnd Game Game Gadget! - read about indie games, gadgets, chiptunes and demoscenesAssembly-like language interpreter and custom machine emulatorSuper Mario Screen Mate - official website or autoit forum pageCogut - Puzzle Game + Editor like sokoban and others Link to comment Share on other sites More sharing options...
FireFox Posted January 7, 2009 Share Posted January 7, 2009 Is there any elegant way of doing this?What do you mean ? $win = GUICreate('',32,32,....., @layered) $pic = GUICtrlCreatePic(..........) While 1 $mgp =MouseGetPos() WinMove($win,$mgp[0],$mgp[1]) Sleep(30) WEnd Cheers, FireFox. Link to comment Share on other sites More sharing options...
madflame991 Posted January 7, 2009 Author Share Posted January 7, 2009 What do you mean ?Eliminating the loop... I believe there are magic spells for binding a window to the cursor Game Game Gadget! - read about indie games, gadgets, chiptunes and demoscenesAssembly-like language interpreter and custom machine emulatorSuper Mario Screen Mate - official website or autoit forum pageCogut - Puzzle Game + Editor like sokoban and others Link to comment Share on other sites More sharing options...
youknowwho4eva Posted January 7, 2009 Share Posted January 7, 2009 you would have to loop to get the position of the mouse. Without a loop the position would only be the original position of the mouse. either that or you would have to loop refresh the gui based on a dll call to where the mouse is. either way loop required. Giggity 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