Need help syncing mouse clicks on 2 Laptops

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
AVangelis
Posts: 2
Joined: 28 Jan 2023, 11:27

Need help syncing mouse clicks on 2 Laptops

Post by AVangelis » 28 Jan 2023, 11:51

Hello everyone! :D

I am not experienced in coding, but I thought I'd send here because I need to do something for my PhD experiment.

I would like to synchronize mouse clicks to be pressed simultaneously on two laptops. I have done this for 2 buttons on the same laptop, but now need to add a 3rd to sync recording start for different sensors data streams...

Specifics:
Laptops are not currently connected to a network (system will have to work in various venues with no guarantee of connection)
Both laptops have Ethernet ports
I have a spare router, but would prefer to connect them ad hoc (router will have to be plugged-in and I try to avoid electrical current noise)
Both laptops run Windows 10
Simultaneous mouse left click on 2 points of the one laptop, and 1 more point of the second laptop

If anyone can help I'd be eternally grateful (and willing to donate a fee)!
Thanks in advance,
Vangelis

gmoises
Posts: 74
Joined: 18 Nov 2017, 16:43

Re: Need help syncing mouse clicks on 2 Laptops

Post by gmoises » 28 Jan 2023, 21:37

I think the easiest way is to have both laptops internal clocks perfectly synchronized, to the millisecond
then have your scripts in both laptops to launch the processes at specific times.

This old and free app can manage the synchronization
NetTime https://osdn.net/projects/sfnet_nettime/

AVangelis
Posts: 2
Joined: 28 Jan 2023, 11:27

Re: Need help syncing mouse clicks on 2 Laptops

Post by AVangelis » 29 Jan 2023, 08:11

Thank you @gmoises for the suggestion !
I visited the NetTime URL, but the application hasn't been updated since 2012 and claims to work on 32bit Windows. I run both laptops on 64bit Windows 10. Do you think it will work on a 64bit system correctly?

If it works, I guess it would probably need to be synced again after a 30 min session, because of the difference in the internal clocks, right? Or will two different laptops keep that level of sync for 30mins?
Also, this solution would mean that for every trial or session (from 1 to 30 minutes) I would have to manually change the time for both laptop scripts and then wait for them to start...
Thank you!

Post Reply

Return to “Ask for Help (v1)”