Short story: a program I'm using can't recognize keypresses if they are too close together (not sure exactly how close, but assume 50ms ish). So I thought I'd make a script that would notice these "simultaneous" keypresses and put some space between them. There's a bonus challenge, but it sounds like more work.
Long story (for google searchability!): I connected a midi keyboard to my pc, and run that input through a program that translates the notes into specific keys on my keyboard, which allows me to play a virtual piano in a game (FFXIV) with my real one. However, it cannot take more than one key at once, which makes playing harder (more tiresome) as you have to stagnate your notes. A would like to make an AutoHotkey script that plays my keys as close together as possible, without me having to worry about it.
Bonus: Ideally, keys would be given priority in a set order, for example, pressing 43251 simultaneously would turn into 12345. This sounds like more code and it's only a minor thing but it'd help for what I'm using it.
I'm a total noob so after like an hour of digging through documentation I could only come up with this. It doesn't work, but I hope it can at least give an idea of what I'm thinking... maybe.
Code: Select all
Array := []
Loop,{
Array.push(A_ThisHotkey)
InProcess := Array.RemoveAt(0)
Send, %InProcess%
Sleep, 1000
}
Code: Select all
Array := []
Loop,{
Input, var
Send, var
Sleep, 1000
}
Thanks