Achilles Posted September 8, 2009 Share Posted September 8, 2009 (edited) Very simple. I was bored and have needed something like this a lot while messing around with graphics. What it does: Press the ` key and the script will save your mouse location, and then give you a new one. Press ` again and your other position is saved and you are back to controlling the original mouse. I realize that you can cover up the pic, but since I did ghetto job of making the picture in the first place I'll leave at that. If anyone has a good .png mouse image (with shadow) I might (or they might) take the time to add that in instead of just taking a little screen shot. expandcollapse popup#Include <ScreenCapture.au3> #include <WindowsConstants.au3> Global Const $PIC_DIR = @TempDir & '\mice_temp_pic.jpg' ; where to store the screen shot Global $showPic = False ; capture a picture to show where the old mouse is Opt('OnExitFunc', '_Exit') If $showPic then $bGui = GUICreate('', 0, 0) $gui = -1 EndIf HotkeySet('`', '_Toggle') $oPos = MouseGetPos() While 1 Sleep(200) WEnd Func _Toggle() $temp = MouseGetPos() If $showPic then If $gui <> -1 then GUIDelete($gui) EndIf FileDelete($PIC_DIR) _ScreenCapture_Capture($PIC_DIR, $temp[0], $temp[1], $temp[0] + 50, $temp[1] + 50, True) $gui = GuiCreate('', 50, 50, $temp[0], $temp[1], $WS_POPUP, -1, $bGui) ;~ ConsoleWrite('-> $gui = ' & $gui & @CRLF) GUICtrlCreatePic($PIC_DIR, 0, 0, 50, 50) GUISetState() EndIf MouseMove($oPos[0], $oPos[1], 0) $oPos = $temp EndFunc Func _Exit() If $showPic then GUIDelete($gui) Exit EndFunc Edited September 8, 2009 by Achilles My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Skrip Posted September 8, 2009 Share Posted September 8, 2009 Oohhh. I like it! Kinda clever! [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
tlman12 Posted September 17, 2009 Share Posted September 17, 2009 I like it 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