newb2007 Posted September 11, 2007 Share Posted September 11, 2007 (edited) Sorry for not finding this easy function, i just have to post :& I need to know how to execute script when i press ex.. space This is my code now.. HotKeySet ( "{space}" [,"MouseClickDrag"] )"left", 528,491, 364,486, 382,450, 482,650 [, 30] ) Also.. if i set a prefered color code in some way, can my mouse click at the prefered color code? Edited September 11, 2007 by newb2007 Link to comment Share on other sites More sharing options...
weaponx Posted September 11, 2007 Share Posted September 11, 2007 (edited) Hotkeyset has to call a function (and you had too many params in your mouseclickdrag call): HotKeySet ( "{space}" , "drag") Func drag() ;MouseClickDrag ( "button", x1, y1, x2, y2 [, speed] ) MouseClickDrag("left", 528,491, 364,486, 30) EndFuncoÝ÷ Øò¢ìÛh±æ«rèªbÅé[ÉÊ%¢·h²¶§X¤zØb±«¢+ØÀÌØí½½ÉôA¥á±MÉ À°À°ÍѽÁ]¥Ñ °ÍѽÁ!¥¡Ð°ÁáÀÀÀÀ¤()!½Ñ-åMÐ ÅÕ½ÐííÍÁôÅÕ½Ðì°ÅÕ½ÐíÉÅÕ½Ðì¤)Õ¹É ¤(í5½ÕÍ ±¥É ÅÕ½ÐíÕÑѽ¸ÅÕ½Ðì°àÄ°äÄ°àÈ°äÈl°ÍÁt¤)5½ÕÍ ±¥É ÅÕ½Ðí±ÐÅÕ½Ðì°ÀÌØí½½ÉlÁt°ÀÌØí½½ÉlÅt°ÌØаÐàØ°ÌÀ¤)¹Õ¹ Edited September 11, 2007 by weaponx Link to comment Share on other sites More sharing options...
newb2007 Posted September 11, 2007 Author Share Posted September 11, 2007 Thx alot!! Really appreciate your help! The first script work, i'll try the second now Link to comment Share on other sites More sharing options...
Ktj Posted September 11, 2007 Share Posted September 11, 2007 Nice example. Link to comment Share on other sites More sharing options...
weaponx Posted September 11, 2007 Share Posted September 11, 2007 Here is a better example, if you minimize all your windows it should drag the icon in the upper left corner to the middle of your desktop: $coord = PixelSearch( 0, 0, @DesktopWidth, @DesktopHeight, 0xFFFFFF ) HotKeySet ( "{space}" , "drag") While 1 Sleep(250) WEnd Func drag() ;MouseClickDrag ( "button", x1, y1, x2, y2 [, speed] ) MouseClickDrag("left", $coord[0],$coord[1], @DesktopWidth / 2,@DesktopHeight / 2, 30) EndFunc 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