khyu80 Posted January 12, 2006 Report Share Posted January 12, 2006 Hi, everyone, having a bit of trouble. I'm trying to substitute one key for 5 different keys, with each successive press of one key cycling through the 5 different keys. For example, I'd like F10 to cycle through 1,2,3,4,5. First press substituting F10 for 1, second press substitution F10 for 2, etc. The only way I can think of to achieve this is through the Wait For Key Press and the Type Text command. However, through this way, I'm getting some bad lag between the F10 keypress and the substitued key registering. I'm mainly using this macro for a game so the lag is hurting the performance of the macro in-game. Perhaps someone might know of a faster way or maybe some options I can change to make it instantaneous? I have a 3Ghz, 2gig mem machine so I don't think hardware is a factor. Any suggestions will be much appreciated. Quote Link to comment Share on other sites More sharing options...
jason Posted January 12, 2006 Report Share Posted January 12, 2006 You could try doing it with the Variable Save and Varible Restore commands. Your macro would need to start with a Variable Restore command. You could then set an if statement to check to see if the variable equals zero. If it does, you will need to increment it to one. You can then have it type out the variable using the text type command and then increment the variable by using the Variable Modify Integer command. The last command should be the Variable Save command. The Variable Save and Variable Restore commands will only work if you do not run any other macros in between that also use variables. It will also not work if you shut Macro Express down and then restart it as the variables will be reset to zero. Quote Link to comment Share on other sites More sharing options...
khyu80 Posted January 12, 2006 Author Report Share Posted January 12, 2006 Hm, that's a little too advanced for me as I haven't had too much experience with the program. Any chance you could break it down Barney style? If not, I understand. My current macro works but it's just the 1 second lag in between that really hurts twitch gaming. Wish the response was instant. Quote Link to comment Share on other sites More sharing options...
jason Posted January 12, 2006 Report Share Posted January 12, 2006 Here are the commands that you will need. These commands can all be accessed from the Scripting Editor. Variable Restore Integer Variables //This command can be found under Variables If Variable %N1% =0 //Look under Logic to find this command Variable Set Integer %N1% to 1 //This command is under Variables End If //Found in Logic Text Type: %N1% //Found under Text Variable Modify Integer: %N1% = %N1% + 1 //Found under Variables Variable Save Integer Variables //Found under Variables Quote Link to comment Share on other sites More sharing options...
khyu80 Posted January 13, 2006 Author Report Share Posted January 13, 2006 WOW, thanks for all your help. That works perfect. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.