Jump to content
Macro Express Forums

Reassigning 1 Key To Repeat A Set Of Keystrokes


khyu80

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...