Jump to content
AC Tool Forums
Sign in to follow this  
hihihihhih

If a key is pressed

Recommended Posts

Hello and thanks for your patience. Let me explain better, I have to make a script that performs 4 different actions depending on the key pressed. For example: if I press the "X" key he will have to press the right mouse button 4 times, but if I press the "Y" key he will have to press the right mouse button 5 times.
Thanks again.

Share this post


Link to post
Share on other sites

If I understand what you are wanting to do. Is that you want to create a script that then sets up, what would be in essence, a macro key for use in the game.

 

Yes, it is possible to do that. But, the macro key would only be available for use. As long as the script is running.

 

With that said, what you need to do is use the Special Variables {GlobalKeyCount} & {GlobalKeys} and the ClearGlobalKey command. You can find the information for these in the AC Tool help file. If you search the forums, you might be able to find some very old topic talking about how to use the {GlobalKeyCount} & {GlobalKeys} and ClearGlobalKeys with in a script. Otherwise you will have to create a test script to experiment on how to use these to create a macro key.

Share this post


Link to post
Share on other sites
On 10/23/2021 at 9:54 PM, The WABBIT said:

With that said, what you need to do is use the Special Variables {GlobalKeyCount} & {GlobalKeys} and the ClearGlobalKey command. You can find the information for these in the AC Tool help file. If you search the forums, you might be able to find some very old topic talking about how to use the {GlobalKeyCount} & {GlobalKeys} and ClearGlobalKeys with in a script. Otherwise you will have to create a test script to experiment on how to use these to create a macro key.

Hi, is it possible to use the SHIFT key in {GlobalKeys}? I know you can use SHIFT + "KEY" but I would need to use only SHIFT as GlobalKey. Thank you.

Share this post


Link to post
Share on other sites
3 hours ago, helloword said:

Hi, is it possible to use the SHIFT key in {GlobalKeys}? I know you can use SHIFT + "KEY" but I would need to use only SHIFT as GlobalKey. Thank you.

you need to read AC Tool Help file about {GlobalKeys}.

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.