@Offtherails: Good idea; however, I've actually come to a different solution, not actually using AutoHotkey but accomplishing what I wanted to do anyway. I just used FreePIE to make the A and D keys move the cursor left and right, and that worked fine in Skyrim. If anyone's interested in doing the same, here's the script I used:
This is just a modified version of the TrackIR to mouse input script on the FreePIE website; the reason I wanted to turn my view with A and D was because I was using TrackIR for head tracking and wanted a secondary way to turn my character. So if anyone else wants to use this script for A and D rotation of the character/view, just take the "if keyboard.getKeyDown..." lines and use those in a FreePIE script, along with the line "sensitivity = 10", or change 10 to another number based on preference. In fact, I think this is what it should be:
sensitivity = 10
if keyboard.getKeyDown(Key.A): mouse.deltaX = -sensitivity if keyboard.getKeyDown(Key.D): mouse.deltaX = sensitivity
@Hirlok: I guess you could say I tested what you asked, as I am trying to do the same thing and having the same problem, where the mouse can be moved by keyboard keys outside of Skyrim but not in the game. I've tried all the different input modes in AutoHotkey.
Basically, what I want to do is make the keyboard walking controls Guild Wars 2-style, where strafing is with Q and E, and A and D turn my character/view left and right in addition to the mouse.
I'm also bothered by how it either moves the cursor slowly and smoothly or quickly but in visible jumps (e.g. 50 pixels at a time); does anyone know if there's a way to make the cursor move rapidly but not in large jumps?
Thanks for this piece of code - might help me to get my problem solved. Maybe other users here are more experienced and could help me - what I am trying to achieve is this: for smooth cam rotation (when recording in-game video) I want to assign mouse movement to hotkeys.
Usually you just add something like
!g::MouseMove, -1, 0, 50, R !h::MouseMove, 1, 0, 50, R
to a script, works (in Windows...)
If I add this to one of the scripts in the mods scripts folder, - it does not work. In Windows yes, but not in game.
Any way to assign mouse movements to autohotkey keys??? thanks & cheers!
It could be that your commands are in a part of the script that never gets called. Try a new script? SAA will load any scripts it finds in the folder; no setup needed.
thanks for the reply. hmmm. Actually I tried that already.
I have the feeling that keyboard handling and mouse handling are 2 things... maybe Skyrim blocks something there, so while we can assign keys to actions etc. no manipulation of the mouse input is accepted...
Just in case you are TERRIBLY bored ;-) - could you try if in your setup you can convince Skyrim to accept mouse pointer movements via AutoHotKey commands and share the result? I just don't get it, but then again I started to use AHK yesterday, LOL
I would like to ask, if any of you guys could help me with AutoHotKey. In my case I would like to bind this console command to MOUSE4: pushactoraway 00000014 1
Ylurien: I don't know, I've never tried. Mod Organizer might let you launch SAA instead of TESV.exe; that would be the preferred method if it's possible. Or you could edit the saa.ini file to point to the Mod Organizer executable.
22 comments
This is just a modified version of the TrackIR to mouse input script on the FreePIE website; the reason I wanted to turn my view with A and D was because I was using TrackIR for head tracking and wanted a secondary way to turn my character. So if anyone else wants to use this script for A and D rotation of the character/view, just take the "if keyboard.getKeyDown..." lines and use those in a FreePIE script, along with the line "sensitivity = 10", or change 10 to another number based on preference. In fact, I think this is what it should be:
Basically, what I want to do is make the keyboard walking controls Guild Wars 2-style, where strafing is with Q and E, and A and D turn my character/view left and right in addition to the mouse.
I'm also bothered by how it either moves the cursor slowly and smoothly or quickly but in visible jumps (e.g. 50 pixels at a time); does anyone know if there's a way to make the cursor move rapidly but not in large jumps?
Might be doable if you switch on Skyrim's controller support and map the keys to the gamepad's X axis... ?
Usually you just add something like
!g::MouseMove, -1, 0, 50, R
!h::MouseMove, 1, 0, 50, R
to a script, works (in Windows...)
If I add this to one of the scripts in the mods scripts folder, - it does not work. In Windows yes, but not in game.
Any way to assign mouse movements to autohotkey keys??? thanks & cheers!
I have the feeling that keyboard handling and mouse handling are 2 things... maybe Skyrim blocks something there, so while we can assign keys to actions etc. no manipulation of the mouse input is accepted...
Just in case you are TERRIBLY bored ;-) - could you try if in your setup you can convince Skyrim to accept mouse pointer movements via AutoHotKey commands and share the result? I just don't get it, but then again I started to use AHK yesterday, LOL
Thanks Since Now!
How did you make your program associate .ahk to it? I'm not just curious, it doesn't work here. W7 64.
I'm not sure what you mean; are you trying to create your own autohotkey scripts? If so, www.autohotkey.com has a huge help forum.