topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 8:31 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Visualize mouse clicks  (Read 16055 times)

haragos

  • Participant
  • Joined in 2007
  • *
  • Posts: 2
    • View Profile
    • Donate to Member
IDEA: Visualize mouse clicks
« on: October 30, 2007, 07:05 AM »
I teach a lot and I really miss that the students can't really see when I click in a demo.

So the Idea: when a mouse click occurs the program draws a little circle around the pointer.

If you have time it could be fancy, fading in/out the circle for example, chooseable color / size, animated circle etc :)



Thanks in advance.




« Last Edit: October 30, 2007, 07:08 AM by haragos »

Ralf Maximus

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 927
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #1 on: October 30, 2007, 07:34 AM »
Oh, neat!

But I want gunfire and a temporary bullet-hole.  I've not had time for my FPS fix lately.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #2 on: October 30, 2007, 01:42 PM »
haragos that's actually a really nice idea.. i'm trying to think if there are other programs that do this already.. if not it would be a nice idea for a coding snack.  :up:

p3lb0x

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 424
  • Beer, beer, beer, I'm going for a beer!
    • View Profile
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #3 on: October 30, 2007, 01:48 PM »
customizable on click graphics with toggle on/off sounds?  Hah id like something similar actually
Stop mousering people so much - Mouser

aCkRiTe

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #4 on: October 30, 2007, 04:42 PM »
I played around with a few scripts to do this with AHK, but cant seem to get any to work perfectly. I came up with another idea that might be of some use to you. This script basically magnifies a certain area around the mouse pointer when the middle mouse button is pressed and sets the screen back to normal when it is pressed a second time. So the middle mouse button is the toggle key for it, which you can change to any hotkey or mouse button you would like. You can also adjust the size of the magnifying box by using the (+) and (-) signs on the numpad. I browsed the AHK forum for a magnifying script so this is not entirely my script, I just modified it to hopefully fit your needs, if not maybe some others will have some use for it.

Link - http://www.autohotke...ckrite/Magnifier.ahk

#SingleInstance Force
#Persistent
#NoEnv
SendMode, Input
SetBatchLines, -1
CoordMode, Mouse

~MButton::

Sleep, 400
Zoom := 4 ; Zoom Factor
Rate := 2 ; Rate of increase/decrease
MinSize := 10 ; Minimum size of gui
Width := 250
Height := 250

ToolTip, %A_Space%
WinGet, hWnd, ID, ahk_class tooltips_class32
WinSet, ExStyle, +0x00000020, ahk_id %hWnd%
hDC_SC := DllCall("GetDC", "Uint", 0)
hDC_TT := DllCall("GetDC", "Uint", hWnd)

Loop
{
MouseGetPos, xmouse, ymouse
DllCall("StretchBlt"
, "Uint", hDC_TT ; handle to destination DC
, "int", 0 ; x-coord of destination upper-left corner
, "int", 0 ; y-coord of destination upper-left corner
, "int", 2*Width ; width of destination rectangle
, "int", 2*Height ; height of destination rectangle
, "Uint", hDC_SC ; handle to source DC
, "int", Xmouse-Width//Zoom ; x-coord of source upper-left corner
, "int", Ymouse-Height//Zoom ; y-coord of source upper-left corner
, "int", 2*Width//Zoom ; width of source rectangle
, "int", 2*Height//Zoom ; height of source rectangle
, "Uint", 0x00CC0020) ; raster operation code
       
WinMove, ahk_id %hWnd%,, Xmouse-Width, Ymouse-Height, 2*Width, 2*Height
WinSet, AlwaysOnTop, On, ahk_id %hWnd%
 
GetKeyState, StateAdd, NumpadAdd
GetKeyState, StateSub, NumpadSub
If StateAdd = D
Width += Rate, Height += Rate
If StateSub = D
{
If (Width >= MinSize) && (Height >= MinSize)
Width -= Rate, Height -= Rate
}
GetKeyState, MButton, Mbutton, P
If MButton = D
Break
}
Reload
Esc::
ExitApp

tsaint

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 497
  • Hi from the a*** end of the earth
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #5 on: October 30, 2007, 05:38 PM »
One of the components of "Milori Training Tools 2001" does that. (notice the year - 2001). Info at: http://tinyurl.com/2usnmw
It's not free however.

There is a freeware product which keeps a circle around the cursor called "sonar4", which at least focusses attention on the cursor. (not quite what you want I know).
I'm sure I've come across exactly what you want, so I'll keep looking.

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #6 on: October 30, 2007, 06:23 PM »
SpotOnTheMouse is supposed to support this (I've never tried it).  It's not free, but it's not too expensive (about 5 Euro):

http://www.markuswel.../software/index.html

I'm surprised this isn't a common request by people who perform demos and presentations.  I wonder if it's something that might be available in the MS Intellimouse drivers (or Logitech's drivers).

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #7 on: October 30, 2007, 06:47 PM »

I'm surprised this isn't a common request by people who perform demos and presentations.  I wonder if it's something that might be available in the MS Intellimouse drivers (or Logitech's drivers).


You must have missed this Virtual Flashlight Idea / Discussion

SpotOnTheMouse was mentioned as well.

tsaint

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 497
  • Hi from the a*** end of the earth
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #8 on: October 30, 2007, 06:57 PM »
that was the one!! I've got the eval version on my puter. :-[ Time for a tidyup methinks.
SpotOnTheMouse is supposed to support this (I've never tried it).  It's not free, but it's not too expensive (about 5 Euro):

http://www.markuswel.../software/index.html

I'm surprised this isn't a common request by people who perform demos and presentations.  I wonder if it's something that might be available in the MS Intellimouse drivers (or Logitech's drivers).


lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #9 on: October 30, 2007, 08:14 PM »
slightly off-topic, there is a Skrommel tool to locate the pointer: MouseMark.

MouseMark - Press Ctrl+M to locate the mouse.

Features:
- Two alternating crossmarks.
- Change hotkey, delay, size, thickness and color.
- To change the settings, choose Settings in the Tray menu.




mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #10 on: October 30, 2007, 08:31 PM »
sounds like MouserMark could be used to do what haragos wants by adding a simple option.

ebs

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #11 on: November 05, 2007, 08:37 AM »
haragos,

This isn't exactly what you want, but it is FREE if you use Windows XP (and maybe Vista, too).

In the Control Panel Mouse Properties dialog, click on the "Pointer Options" tab and look at the bottom of the "Visibility" section.
Check the "Show location of pointer when I press the CTRL key" and click OK.

Not the fanciest display, but it might be useful.

Regards,
Eric

haragos

  • Participant
  • Joined in 2007
  • *
  • Posts: 2
    • View Profile
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #12 on: November 05, 2007, 01:33 PM »
Ebs,

Thanks I know that funcion but if you have ever tried to press CTRL just before a click 500 times you should know this is not the best way :)

Mw1000 I downloaded spotonthemouse, yes that's what I want, the only annoying thing: it isnt looking too good (the circle is not a circle, but if I wont find anything else I will buy it :) )

I cant image that's the only program in world doing this :)

belkira

  • Member
  • Joined in 2006
  • **
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #13 on: November 05, 2007, 02:32 PM »
haragos,

This isn't exactly what you want, but it is FREE if you use Windows XP (and maybe Vista, too).

In the Control Panel Mouse Properties dialog, click on the "Pointer Options" tab and look at the bottom of the "Visibility" section.
Check the "Show location of pointer when I press the CTRL key" and click OK.

Not the fanciest display, but it might be useful.

Regards,
Eric

Using this idea, if you select that option then create an AHK script of:
~LButton::^Lbutton

That would essentially take care of it. Every time you clicked it would draw the locater circle thing.
A bit ugly maybe, but a free fix.

belkira

  • Member
  • Joined in 2006
  • **
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #14 on: November 05, 2007, 03:53 PM »
slightly off-topic, there is a Skrommel tool to locate the pointer: MouseMark.

MouseMark - Press Ctrl+M to locate the mouse.

Features:
- Two alternating crossmarks.
- Change hotkey, delay, size, thickness and color.
- To change the settings, choose Settings in the Tray menu.





To take from that post, I modified his code just a bit so the hotkey is the left mouse button and the graphic is now a bullseye.
The graphic can be any wingding character. again this is an AHK script.

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <[email protected]>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#SingleInstance,Force
SetWinDelay,0
DetectHiddenWindows,On
CoordMode,Mouse,Screen

Gosub,INI
Gosub,TRAYMENU
Return


DOWN:
down=1
Loop,2
{
  MouseGetPos,x,y
  size:=size%A_Index%
  width:=size%A_Index%*1.4
  height:=size%A_Index%*1.4
  color:=color%A_Index%
  boldness:=boldness%A_Index%
  Gui,%A_Index%:Destroy
  Gui,%A_Index%:+Owner +AlwaysOnTop -Resize -SysMenu -MinimizeBox -MaximizeBox -Disabled -Caption -Border -ToolWindow
  Gui,%A_Index%:Margin,0,0
  Gui,%A_Index%:Color,123456
  Gui,%A_Index%:Font,C%color% S%size% W%boldness%,Wingdings
  Gui,%A_Index%:Add,Text,,ยค
  Gui,%A_Index%:Show,X-%width% Y-%height% W%width% H%height% NoActivate,MouseMark%A_Index%
  WinSet,TransColor,123456,MouseMark%A_Index%
}
Loop
{
  Loop,2
  {
    MouseGetPos,x,y
    WinMove,MouseMark%A_Index%,,% x-size%A_Index%/1.7,% y-size%A_Index%/1.4
    WinShow,MouseMark%A_Index%
    Sleep,%delay%
    WinHide,MouseMark%A_Index%
    Sleep,%delay%
    If down=0
      Return
  }
}
Return


UP:
down=0
Loop,2
{
  Gui,%A_Index%:Destroy
}
Return


TRAYMENU:
Menu,Tray,NoStandard
Menu,Tray,DeleteAll
Menu,Tray,Add,MouseMark,ABOUT
Menu,Tray,Add,
Menu,Tray,Add,&Settings...,SETTINGS
Menu,Tray,Add,&About...,ABOUT
Menu,Tray,Add,E&xit,EXIT
Menu,Tray,Default,MouseMark
Menu,Tray,Tip,MouseMark
Return


SETTINGS:
HotKey,%hotkey%,Off
HotKey,%hotkey% Up,Off
Gui,Destroy
Gui,Add,GroupBox,xm ym w400 h70,&Hotkey
Gui,Add,Hotkey,xp+10 yp+20 w380 vshotkey
StringReplace,current,hotkey,+,Shift +%A_Space%
StringReplace,current,current,^,Ctrl +%A_Space%
StringReplace,current,current,!,Alt +%A_Space%
Gui,Add,Text,,Current hotkey: %current%
Gui,Add,GroupBox,xm y+20 w400 h50,&Delay
Gui,Add,Edit,xp+10 yp+20 w380 vsdelay,%delay%
Gui,Add,GroupBox,xm y+20 w400 h110,Mark &1
Gui,Add,Text,xp+10 yp+20,&Size1:
Gui,Add,Edit,xm+100 yp w290 vssize1,%size1%
Gui,Add,Text,xm+10 y+10,Colo&r1:
Gui,Add,Edit,xm+100 yp w290 vscolor1,%color1%
Gui,Add,Text,xm+10 y+10,&Boldness1:
Gui,Add,Edit,xm+100 yp w290 vsboldness1,%boldness1%
Gui,Add,GroupBox,xm y+20 w400 h110,Mark &2
Gui,Add,Text,xp+10 yp+20,S&ize2:
Gui,Add,Edit,xm+100 yp w290 vssize2,%size2%
Gui,Add,Text,xm+10 y+10,Co&lor2:
Gui,Add,Edit,xm+100 yp w290 vscolor2,%color2%
Gui,Add,Text,xm+10 y+10,Bol&dness2:
Gui,Add,Edit,xm+100 yp w290 vsboldness2,%boldness2%
Gui,Add,Button,xm y+10 w75 GSETTINGSOK,&OK
Gui,Add,Button,x+5 w75 GSETTINGSCANCEL,&Cancel
Gui,Show,,MouseMark Settings
Return

SETTINGSOK:
Gui,Submit
If shotkey<>
{
  hotkey:=shotkey
  HotKey,%hotkey%,DOWN
  HotKey,%hotkey% Up,UP
}
HotKey,%hotkey%,On
HotKey,%hotkey% Up,On
If sdelay<>
  delay:=sdelay
If ssize1<>
  size1:=ssize1
If ssize2<>
  size2:=ssize2
If scolor1<>
  color1:=scolor1
If scolor2<>
  color2:=scolor2
If sboldness1<>
  boldness1:=sboldness1
If sboldness2<>
  boldness2:=sboldness2
IniWrite,%hotkey%,MouseMark.ini,Settings,hotkey
IniWrite,%delay%,MouseMark.ini,Settings,delay
IniWrite,%size1%,MouseMark.ini,Settings,size1
IniWrite,%size2%,MouseMark.ini,Settings,size2
IniWrite,%color1%,MouseMark.ini,Settings,color1
IniWrite,%color2%,MouseMark.ini,Settings,color2
IniWrite,%boldness1%,MouseMark.ini,Settings,boldness1
IniWrite,%boldness2%,MouseMark.ini,Settings,boldness2
Return

SETTINGSCANCEL:
HotKey,%hotkey%,DOWN,On
HotKey,%hotkey% Up,UP,On
HotKey,%hotkey%,On
HotKey,%hotkey% Up,On
Gui,Destroy
Return


INI:
IfNotExist,MouseMark.ini
{
  IniWrite,~LButton,MouseMark.ini,Settings,hotkey
  IniWrite,200,MouseMark.ini,Settings,delay
  IniWrite,50,MouseMark.ini,Settings,size1
  IniWrite,150,MouseMark.ini,Settings,size2
  IniWrite,FF0000,MouseMark.ini,Settings,color1
  IniWrite,0000FF,MouseMark.ini,Settings,color2
  IniWrite,1,MouseMark.ini,Settings,boldness1
  IniWrite,2,MouseMark.ini,Settings,boldness2
}
IniRead,hotkey,MouseMark.ini,Settings,hotkey
IniRead,delay,MouseMark.ini,Settings,delay
IniRead,size1,MouseMark.ini,Settings,size1
IniRead,size2,MouseMark.ini,Settings,size2
IniRead,color1,MouseMark.ini,Settings,color1
IniRead,color2,MouseMark.ini,Settings,color2
IniRead,boldness1,MouseMark.ini,Settings,boldness1
IniRead,boldness2,MouseMark.ini,Settings,boldness2
HotKey,%hotkey%,DOWN
HotKey,%hotkey% Up,UP
Return


ABOUT:
Gui,Destroy
Gui,Add,Picture,Icon1,MouseMark.exe
Gui,Font,Bold
Gui,Add,Text,x+10 yp+10,MouseMark v1.0
Gui,Font
Gui,Add,Text,xm,Press Ctrl+M to locate the mouse.
Gui,Add,Text,xm,To change the settings, choose Settings in the tray menu.
Gui,Add,Text,xm y+15,Made using AutoHotkey -
Gui,Font,CBlue Underline
Gui,Add,Text,x+5 GAUTOHOTKEY,http://www.autohotkey.com
Gui,Font
Gui,Add,Text,xm,`t
Gui,Add,Picture,Icon2,MouseMark.exe
Gui,Font,Bold
Gui,Add,Text,x+10 yp+10,1 Hour Software by Skrommel
Gui,Font
Gui,Add,Text,xm,For more tools and information, please stop by at
Gui,Font,CBlue Underline
Gui,Add,Text,xm GWWW,https://www.donationcoder.com/Software/Skrommel
Gui,Font
Gui,Add,Button,GABOUTOK Default xm+220 y+20 w75,&OK
Gui,Show,,ShiftOff About
about=
Return

AUTOHOTKEY:
Run,http://www.autohotkey.com,,UseErrorLevel
Return

WWW:
Run,https://www.donationcoder.com/Software/Skrommel,,UseErrorLevel
Return

ABOUTOK:
Gui,Destroy
Return


EXIT:
ExitApp

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #15 on: November 05, 2007, 04:01 PM »
It works!!!

Nice job belkira  :up:

belkira

  • Member
  • Joined in 2006
  • **
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Visualize mouse clicks
« Reply #16 on: November 06, 2007, 11:12 AM »
Thanks, but to give credit where credit is due, it is Skrommel's script...I just tweaked it a little :-)