I have no idea how to word the subject to this. I think what I'm asking for is way outside of my ability to code anything. Here is what I need:
Imagine a hot bar with numbers 1-10. You can cycle through the hot bar with the left and right arrow keys and then execute the skill by pressing x (or whatever). What I want is to be able to say a number, have it cycle the appropriate number of times in the appropriate direction and then press x. If it's already on that number, it just presses x.
It would start at default position 1. If I say 5, it will move 4 times to the right (right arrow key 4 times) and then press x. It will then remember this position for future reference. If I say 8, it will check to see what position it's on (currently 5) and then move however many times and press x (in this case right 3 times). If I now say 4, it will go in the opposite direction (left 4 times, then press x). Finally, if I'm already on the number, it just presses x (so in this example saying 4 again just presses x).
Could someone help me code this? I have no clue what the appropriate terminologies are so I didn't know how to title this.