Jump to content
AC Tool Forums
Sign in to follow this  
The WABBIT

An Updated Keys command

Recommended Posts

okay, I have heard from a couple of people that the Keys command is not sending the switching keys, ie Shift, Alt, and Ctrl, And I have heard from those same people that it is a bug.

 

Well, after about 30min I have found that the Keys command is actually working as it is originally coded.

 

The switch keys:

Shift = ~

Alt = @

Ctrl = ^

 

If any of these three keys are used as part of the very first key to send, as in @F. You'd get the Alt-F key sent to the program/game. But, if you used any of these keys later on in your key string, as in: Sending the Alt-F key @F, Then they Alt-F key is not sent. Instead AC Tool would send both the @ and the F to the program/game.

 

The logic for the sending of keys specifically sends the Switch key only if the Switch key character is the very first one. All the other switch key characters are treated as their normal characters and sent as is.

 

So, if you must send to a game a series of keys that use a switch key. Then you must send them separately in multiple of Keys statements.

 

Example:

What you want it to be -
 

Keys @F@S  // To save a file from a program's File menu
Delay 5 sec
Keys TestFilename.txt{Enter}

 

What it has to be -
 

Keys @F  // To access the file menu
Keys @S  // To save a file from a program's File menu
Delay 5 sec
Keys TestFilename.txt{Enter}

 

I know that many of you think this is a bug. But, it truly is not a bug. If anything it is a shortsighted coding done by whom ever originally coded it, or updated the code.

 

Now with this in mind. I am going to make the Keys command work as many people expect it to work.

Of course this will only be implemented in Divide.

Share this post


Link to post
Share on other sites
7 hours ago, Joguin said:

what about alt tab? what is the correct form?

Since you obviously didn't read the Help file. And since you obviously didn't even bother to try to create a simple test script to try and do this key combination. (For which if you had you would have posted it here so that we can help you know your mistake, if you had any. And you didn't even bother to to at least let us know what kind of script you are trying to create. Or even for what game, or application, that you are trying to create the script for.

But, since you obviously expect to receive the answer despite all that. Here is an very simple script for the current release of Divide. That will show you what you need to do in Divide. And yet it should not be that hard for you to convert it for use in AC Tool. If that is what you are using.

uses
  Divide;

begin
  Keys('@{Tab}');
end;

 

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.