I think you can make SakasaMouse, AutoHotkey and SC:R work together on Mac and Linux by using the methods below:
Mac
I think there are chances to get this work for Mac by using either Bootcamp or Parallels, according to this post:
https://www.autohotkey.com/boards/viewtopic.php?p=271729&sid=643ef1e98c6372f38a4a09b19d74bd21#p271729.
Although, I don’t know if there would be any issues running SC:R with the Bootcamp or Parallels. In case SC:R won’t work, you can try looking up for a virtual machine solution that allows GPU passthrough. More info about this in the Linux section.
You can have a look at these two links, for VirtualBox and VMWare:
https://www.virtualbox.org/wiki/Mac%20OS%20X%20build%20instructions
https://www.vmware.com/products/fusion.html
Linux
For Linux you can try VMWare, Hyper-V, VirtualBox. In case you need GPU passthrough, check my previous two posts (they may apply for Mac, as well):