chat script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Vladik23045
Posts: 4
Joined: 12 Aug 2022, 06:50

chat script

Post by Vladik23045 » 15 Aug 2022, 00:54

Code: Select all

Numpad2::
SendMessage, 0x50,, 0x4190419,, A
SendInput, !снять <@%id%>
return
Help, in this code, when pasting, only "get <@%id%>" is displayed, that is, the script skips "!c".

User avatar
boiler
Posts: 17089
Joined: 21 Dec 2014, 02:44

Re: chat script

Post by boiler » 15 Aug 2022, 01:06

Use {Text} mode so the ! isn’t interpreted as the Alt key modifier:

Code: Select all

SendInput, {Text}!снять <@%id%>

If %id% is meant to use the contents of the id variable, then send that part on a separate line without text mode:

Code: Select all

SendInput, {Text}!снять
SendInput, %A_Space%<@%id%>
The A_Space variable is to preserve the space between the two parts when broken into two parts.

Or you can just escape the !:

Code: Select all

SendInput, `!снять <@%id%>

Make sure to save your script file using “UTF-8 with BOM” encoding.

Post Reply

Return to “Ask for Help (v1)”