Quicker alternatives for Send ? ( Used for gaming ) Topic is solved

Ask gaming related questions
BeerusIV
Posts: 15
Joined: 24 Jan 2021, 15:41

Quicker alternatives for Send ? ( Used for gaming )

Post by BeerusIV » 24 Jan 2021, 17:23

I am using this script for gaming ( Apex Legends if it matters ).
I live with roommates so I am unable to use a microphone most of the time, for this reason I have made a huge script with keybindings for every single thing I could possibly say.

Here is an example :

Code: Select all

Numpad0::
Send, {Enter} ; opens the chat
Sleep 100 ; slow pc.. don't ask
Send, I am pushing the enemy in 10 seconds, ready up and cover me please. ; the text
Sleep 100 ; same as before.. if I don't do this it sometimes messes the text up
Send, {Enter} ; sends the message
return
The chat opens up and it takes a fairly long amount of time until the message is typed and sent.
What I was thinking in order to improve this is to use clipboards, maybe have the text copied into different clipboard slots and spit it out on demand - BoBo helped me find this tool I was using a couple years back :
https://www.autohotkey.com/boards/viewtopic.php?t=5858

I thought I could maybe combine the functions of the clipboard script with my current one, but I am having so much trouble with understanding what exactly is happening there.
Does anyone have any idea on how I can implement this? other alternatives/tips are welcome too!


Edit : I just noticed there is a Gaming sub-forum, forgive me for I am new here :crazy:
Would be great if a moderator could move it there, thanks and sorry!
Last edited by BeerusIV on 24 Jan 2021, 17:34, edited 1 time in total.
User avatar
mikeyww
Posts: 5347
Joined: 09 Sep 2014, 18:38

Re: Quicker alternatives for Send ? ( Used for gaming )  Topic is solved

Post by mikeyww » 24 Jan 2021, 17:27

Some ideas:

Code: Select all

SendMode Input
Clipboard =
Clipboard = I am pushing the enemy in 10 seconds, ready up and cover me please.
ClipWait
If ErrorLevel
 MsgBox, 48, Error, An error occurred while waiting for the clipboard.
Else Send ^v
You can also eliminate the clipboard approach and just use SendInput as shown. It will be faster than your original script. You might also find that with SendMode Input at the top, you no longer need the second sleep command.

Code: Select all

SendMode Input
Numpad0::
Send {Enter}
Sleep, 100
Send {Text}I am pushing the enemy in 10 seconds, ready up and cover me please.
Send {Enter}
Return
BeerusIV
Posts: 15
Joined: 24 Jan 2021, 15:41

Re: Quicker alternatives for Send ? ( Used for gaming )

Post by BeerusIV » 24 Jan 2021, 17:32

mikeyww wrote:
24 Jan 2021, 17:27
Some ideas:

Code: Select all

SendMode Input
Clipboard =
Clipboard = I am pushing the enemy in 10 seconds, ready up and cover me please
ClipWait
If ErrorLevel
 MsgBox, 48, Error, An error occurred while waiting for the clipboard.
Else Send ^v
You can also eliminate the clipboard approach and just use SendInput as shown. It will be faster than your original script.
Thank you! this looks great,
I will try it right now and see if it works.
About the SendMode Input - It is indeed speeding up the Send but for some reason it never works in Apex, it reaches the first "Send, {Enter}" thus opening up the chat, but nothing shows up in there and it doesn't reach the second "Send, {Enter}" which is supposed to send the message, so I am left with an empty chat box, I am clueless about what the issue might be so I never tried it again.
User avatar
mikeyww
Posts: 5347
Joined: 09 Sep 2014, 18:38

Re: Quicker alternatives for Send ? ( Used for gaming )

Post by mikeyww » 24 Jan 2021, 17:55

OK. Remember that Send will send only to the active window. In some cases, a window needs to be activated (WinActivate) or reactivated before Send can work. If the chat area is a particular control, then it is possible that the control needs to be activated or focused first (ControlFocus). I do not know whether this is the issue at hand-- as some programs use windows within windows, etc. In any case, the clipboard is often a good option for sending text quickly.
BeerusIV
Posts: 15
Joined: 24 Jan 2021, 15:41

Re: Quicker alternatives for Send ? ( Used for gaming )

Post by BeerusIV » 24 Jan 2021, 18:30

mikeyww wrote:
24 Jan 2021, 17:55
OK. Remember that Send will send only to the active window. In some cases, a window needs to be activated (WinActivate) or reactivated before Send can work. If the chat area is a particular control, then it is possible that the control needs to be activated or focused first (ControlFocus). I do not know whether this is the issue at hand-- as some programs use windows within windows, etc. In any case, the clipboard is often a good option for sending text quickly.
Thank you so much! both the solutions are now working.
In case anyone comes across this post looking for answers -

The clipboard is a very useful solution, I personally managed to get the "SendMode Input" running which does send the keys remarkably faster than the regular send.
I couldn't get the SendMode Input running at first simply because I forgot to put {Text} before the actual text, which apparently makes a difference.
User avatar
mikeyww
Posts: 5347
Joined: 09 Sep 2014, 18:38

Re: Quicker alternatives for Send ? ( Used for gaming )

Post by mikeyww » 24 Jan 2021, 19:39

Although you don't need {Text} for SendMode Input, {Text} improves reliability in some cases, perhaps including yours. Good luck!
Post Reply

Return to “Gaming”