aa2zz6 Posted September 16, 2015 Share Posted September 16, 2015 So I was wondering if it was possible to add some type of buffer that goes underneath the record mouse position when it's clicked. So if the mouse is positioned at 0,0 and the user clicks the cursor will display 0,0 but is it possible to add some type of color buffer underneath it? The text color is black and the buffer color underneath it would be all white.Here's the record mouse position code.#include <Misc.au3> HotKeySet("{END}", "_Quit") ; Hit "END" to quit $dll = DllOpen("user32.dll") While 1 If _IsPressed("01", $dll) Then $avMousePos = MouseGetPos() ToolTip("x = " & $avMousePos[0] & " y = " & $avMousePos[1]) EndIf WEnd Func _Quit() DllClose($dll) Exit EndFunc ;==>_Quit Link to comment Share on other sites More sharing options...
javiwhite Posted September 16, 2015 Share Posted September 16, 2015 (edited) Hey aa2zz6,If I understand your request correctly, Then you are looking for something like this:#include <Misc.au3> #include<GUIconstants.au3> HotKeySet("{END}", "_Quit") ; Hit "END" to quit $dll = DllOpen("user32.dll") ;Create A Semi-Transparent GUI $iWidth = 40 ;width for the highlight $iHeight = 40 ;Height for the highlight $hGUI = GUIcreate("",$iWidth,$iHeight,-1,-1,$WS_POPUP,$WS_EX_TOPMOST) ;Create the highlighter $WS_POPUP = no gui bar, $WS_EX_TOPMOST = always on top GUISetBkColor(0xFFFFFF,$hGUI) ;Set the colour of the GUI to white WinSetTrans($hGUI,"",100) ;Set the transparancy of the gui (from 0 - 255, 0 being invisible, 255 being solid) GUISetState(@SW_SHOW) ;Show the GUI While 1 If _IsPressed("01", $dll) Then $avMousePos = MouseGetPos() WinMove($hGUI,"",$avMousePos[0] - ($iWidth / 2),$avMousePos[1] - ($iHeight/ 2)) ;Move Centre of GUI to where mouse was clicked ToolTip("x = " & $avMousePos[0] & " y = " & $avMousePos[1]) EndIf WEnd Func _Quit() DllClose($dll) Exit EndFunc ;==>_QuitCheers Javi Edited September 16, 2015 by javiwhite Change colour val from yellow to white as per OP's request aa2zz6 1 give a man an application, and he'll be frustrated for the day, Teach him how to program applications and he'll be frustrated for a lifetime. Link to comment Share on other sites More sharing options...
aa2zz6 Posted September 16, 2015 Author Share Posted September 16, 2015 (edited) This is exactly what I was thinking of creating. Thank you Javi. Edited September 16, 2015 by aa2zz6 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