Display ripple effect when mouse click

Post your working scripts, libraries and tools
User avatar
mright
Posts: 3
Joined: 20 Jul 2015, 10:44

Display ripple effect when mouse click

20 Jul 2015, 22:02

This script can show a little ripple effect when you left/right click the mouse button.
When the mouse is idle for five seconds or you press left control key, display the ripple to indicate the location of the cursor.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Last edited by mright on 24 Jul 2015, 23:17, edited 1 time in total.
User avatar
mright
Posts: 3
Joined: 20 Jul 2015, 10:44

Re: Display ripple effect when mouse click

20 Jul 2015, 22:34

And by the way, I would like to report a strange behavior:
When I was refactoring the previous code, I found that if I rename the variable name "buf" to "temp", then the DllCall("GdiplusStartup"...) function returns an error code 2, which means invalid parameter, this happend to the DllCall("CreateDIBSection",...) call too, but except the name "temp", any other variable name will be ok, is this by design or something?
User avatar
noname
Posts: 507
Joined: 19 Nov 2013, 09:15

Re: Display ripple effect when mouse click

21 Jul 2015, 03:07

nice effect :) !

I had the same with "path" variable name the solution is to add #NoEnv at the beginning of your code.
User avatar
mright
Posts: 3
Joined: 20 Jul 2015, 10:44

Re: Display ripple effect when mouse click

21 Jul 2015, 03:42

lain wrote:nice effect :) !

I had the same with "path" variable name the solution is to add #NoEnv at the beginning of your code.


Thank you very much! I never thought that environment variables would affect script code.
User avatar
jNizM
Posts: 2320
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
Contact:

Re: Display ripple effect when mouse click

21 Jul 2015, 03:43

But there is a problem with multi-monitor...
[AHK] 1.1.29.01 x64 Unicode | [WIN] 10 Pro (Version 1803) x64 | [GitHub] Profile
Donations are appreciated if I could help you
User avatar
Relayer
Posts: 116
Joined: 30 Sep 2013, 13:09
Location: Delaware, USA

Re: Display ripple effect when mouse click

21 Jul 2015, 08:23

This submission packs some of the nuts and bolts in a dll. I believe it is similar but I have not run yours yet.

http://ahkscript.org/boards/viewtopic.php?f=22&t=3302&p=16261&hilit=waterctrl#p16261

Relayer
gwarble
Posts: 235
Joined: 30 Sep 2013, 15:01

Re: Display ripple effect when mouse click

24 Jul 2015, 12:26

cool effect... i think you need "coordmode, mouse, screen" or something because it only positions correctly on a full screen window... on a smaller window it "ripples" in the position from the screen top left corner relative to the windows top left corner if that makes sense... that could also be the multi monitor problem
Last edited by gwarble on 24 Jul 2015, 12:59, edited 1 time in total.
EitherMouse - Multiple mice, individual settings . . . . www.EitherMouse.com . . . . forum . . . .
sobuj53
Posts: 35
Joined: 19 Mar 2015, 16:08

Re: Display ripple effect when mouse click

24 Jul 2015, 12:47

Really cool effect but I'm having some issue like, in Notepad window the ripple effect doesn't correctly shows the mouse ripple effect it also happens in any autohokey generated GUI window. In those instance the mouse ripple happens in different position than actual mouse pointer position. But thanks for your great work :)
User avatar
boiler
Posts: 2372
Joined: 21 Dec 2014, 02:44

Re: Display ripple effect when mouse click

24 Jul 2015, 22:43

Yes, adding CoordMode, Mouse, Screen as the first line of the script solves the multiple monitor and the other issues for me. Neat script.
sobuj53
Posts: 35
Joined: 19 Mar 2015, 16:08

Re: Display ripple effect when mouse click

25 Jul 2015, 01:17

Thank you very much, that solves everything :bravo:
SashaChernykh
Posts: 32
Joined: 01 Sep 2016, 04:04
GitHub: Kristinita
Contact:

Re: Display ripple effect when mouse click

17 Sep 2016, 00:18

I'm sorry, that possible separate effect, when I make double-click left mouse button?

Thanks.
robodesign
Posts: 367
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Display ripple effect when mouse click

15 Oct 2017, 14:30

very nice.... how to make the liner thicker? [never mind; found it]

How to reverse the animation? I would like it reversed for right-click.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
User avatar
Drugwash
Posts: 567
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: Display ripple effect when mouse click

18 Oct 2017, 03:53

Here you are, Marius. I've added the ability to modify the idle timer and the pen width besides reverse animation switch:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
robodesign
Posts: 367
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Display ripple effect when mouse click

18 Oct 2017, 07:31

Thank you very much Drugwash.

The main problem is that I cannot integrate it into my script, at least I failed to do so...

KeyPress uses Hotkey command to bind to the mouse buttons and this one, labels. If I invoke ShowRipple() function from different threads, other than ~LButton, it does not work.

got any suggestions? I thought of implementing visual mouse clicks in another way, without this script, because of this.

Best regards, Marius
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
User avatar
Drugwash
Posts: 567
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: Display ripple effect when mouse click

18 Oct 2017, 12:21

I'll have to check that tomorrow, time allowing; right now I'm exhausted, been working in the garden all day.
In the mean time make sure you have

Code: [Select all] [Download] GeSHi © Codebox Plus

CoordMode Mouse, Screen
Setup()
in the autoexec section of HotkeyOSD and nothing else interferes with that CoordMode and with any of the global variables declared in Setup(). Also make sure you call ShowRipple() with a valid color as first parameter and maybe call it on a timer right before exiting the hotkey command, like SetTimer, showRipple, -1 where showRipple is a label that actually calls ShowRipple().

Just noticed the script doesn't invoke GdiplusShutdown before exit.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
Reloaded
Posts: 267
Joined: 25 Aug 2017, 08:48

Re: Display ripple effect when mouse click

19 Oct 2017, 13:03

Pretty Cool ! :)

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 18 guests