Skip to content

Instantly share code, notes, and snippets.

@emarg
Created April 6, 2016 06:38
Show Gist options
  • Save emarg/88646a91c9bf00a4964d5c8271a1f528 to your computer and use it in GitHub Desktop.
Save emarg/88646a91c9bf00a4964d5c8271a1f528 to your computer and use it in GitHub Desktop.
Coursor click visualizer modifyed from TaranVH and for TaranVH
;Austin Sims Cursor click vertuilaiser Modifyed from TaranVH
;Version 1 - Up to date as of 6/04/2016
; Copyright 2016
;ISSUES: Currently in Version 1 corner symbols can only appear in the top left of screen
;User Settings
mid_button = 0 ; set symbol for middle mouse button (1 = yes 0 = no)
Follow_Mouse = 1 ;sets if symbol follow mouse or appear in corner (1 = follow 0 = courner )
;------------------------------------------------------------------------
scroll_fix = 0
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode, mouse, Screen
CustomColor = EEAA99 ; Can be any RGB color (it will be made transparent below).
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow ; +ToolWindow avoids a taskbar button and an alt-tab menu item.
Gui, Color, %CustomColor%
Gui, Font, s32 ; Set a large font size (32-point).
Gui, Add, Text, vMyText cLime, xx ; xx auto-size's the window.
; Make all pixels of this color transparent and make the text itself translucent (150):
WinSet, TransColor, %CustomColor% 150
SetTimer, UpdateOSD, 200
Gosub, UpdateOSD ; Make the first update immediate rather than waiting for the timer.
Gui, Show, x0 y400 NoActivate ; NoActivate avoids deactivating the currently active window.
gui, show, ,movinggui
settimer, watchcursor, 10
if (Follow_Mouse == 0){
WinMove, 1800, 950
oX = 1800
oY = 950
}
Gui, Hide
return
UpdateOSD:
WatchCursor:
return
~*$LButton::
{
While Getkeystate("LButton","P")
{
posX := Round(oX - Size/2), posY := Round(oY - Size/2)
Gui, Show, x%posX% y%posY% NA
GuiControl,, MyText, (
if (Follow_Mouse == 1){
MouseGetPos, oX, oY
WinMove, movinggui, , oX -60, oY - 50 ;Sets pos of symbol
}
}
tooltip
Gui, Hide
}
return
~*$RButton::
{
While Getkeystate("RButton","P")
{
posX := Round(oX - Size/2), posY := Round(oY - Size/2)
Gui, Show, x%posX% y%posY% NA
GuiControl,, MyText, )
if (Follow_Mouse == 1){
MouseGetPos, oX, oY
WinMove, movinggui, , oX -25, oY - 50 ;Sets pos of symbol
}
}
tooltip
Gui, Hide
}
return
~*$MButton::
{
if (mid_button == 1){
While Getkeystate("MButton","P")
{
posX := Round(oX - Size/2), posY := Round(oY - Size/2)
Gui, Show, x%posX% y%posY% NA
GuiControl,, MyText, |
if (Follow_Mouse == 1){
MouseGetPos, oX, oY
WinMove, movinggui, , oX -25, oY - 50 ;Sets pos of symbol
}
}
tooltip
Gui, Hide
}
}
return
~*$WheelUp::
{
if (Getkeystate("WheelUp","P"))
{
posX := Round(oX - Size/2), posY := Round(oY - Size/2)
Gui, Show, x%posX% y%posY% NA
GuiControl,, MyText, ^
if (Follow_Mouse == 1){
MouseGetPos, oX, oY
WinMove, movinggui, , oX - 48, oY - 60 ;Sets pos of symbol
}
sleep, 100 ;Used to reduce flicker while scrolling
}
tooltip
Gui, Hide
}
return
~*$WheelDown::
{
if (Getkeystate("WheelDown","P"))
{
posX := Round(oX - Size/2), posY := Round(oY - Size/2)
Gui, Show, x%posX% y%posY% NA
GuiControl,, MyText, v
if (Follow_Mouse == 1){
MouseGetPos, oX, oY
WinMove, movinggui, , oX - 48, oY - 20 ;Sets pos of symbol
}
sleep, 100 ;Used to reduce flicker while scrolling
}
tooltip
Gui, Hide
}
return
; still to do
; DONE make right click, middle, and scroll work.
; DONE want to use ( next to the cursor for left click
; DONE ) for right click
; DONE ^ for scroll up
; DONE v for scroll down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment