the dude22
9 discussion posts
I've been using a similar program that allows you to convert mouse movements to key presses. For example, with driving games if I wanted to use the mouse to steer I could use this script and just say " driving mode" to toggle it.
if said(" driving mode") then
var.mouse ++
wait 2s
endif
if var.mouse > 1 then
var.mouse = 0
Say("Mouse Unlocked")
endif
if var.mouse = true then
if delta(smooth(mouse.DirectInputX))<-3 then
key.A=1
else key.A=0
if delta(smooth(mouse.DirectInputX))>3 then
key.D=1
else key.D=0
endif
I noticed this program has the ability to use macros so I'm guessing it's possible. It's a different programming language than the other program so I don't know how to accomplish it yet but I wanted to see if it was possible
the dude22
9 discussion posts
Sounds good, I will check back in and see what he came up with. Thanks for the help
the dude22
9 discussion posts
I guess it's been a while but I never got a notification of the reply. Thanks for the script though. I went ahead and gave it a try. It seems to work but wasn't exactly what I was going for. There's really no dead zone in the center so the keys are constantly being pressed either to the left or the right. Is there a way to get the script to work that way? What I was going for and the other programs does is that if you move the mouse to the left or right direction it will hold down the key until the mouse stops moving. It only toggles the keys on movement and not by the mouse being on the left or right side of the screen. I was also noticing it set up for the left and right keys versus the a and D keys. I can see how to change that in the script but I'm not sure of the key codes for the A and D key with voice bot.
If you want to tweak the script and how responsive it is or not, I'd recommend changing the two constant values at the start of the script. "Threshold" on line 10, and "IntervalMS" on line 14. If you find the script a bit touchy, then I'd recommend raising the "Threshold" variable. If you find the mouse if being moved for too long, I'd recommend lowering the "IntervalMS" variable.
I hope this helps!
Jul 29, 2024 (modified Jul 29, 2024)
•
#8
the dude22
9 discussion posts
Thanks for getting back to me, I will try to tweak it that way instead.thank you much! This will be a big help to me