I've updated the example script (also attached it):
- now you need to hold "Alt" for binds to work (so the script won't interfere with chatting),
- added commas after 'Send' commands (thx to Kaleu),
- added some popular rules:
; INFO: "!j" = "Alt"+"j" ; if you want to use "Ctrl" instead, just swap:
; "!" with "^" (omit the quotes)
;
; codepage := 65001 ; uncomment the start of this line for UTF-8 encoding,
; remember to save the script as 'Unicode big endian'
;
; to produce a literal commas or percent signs, you need to use so-called
; escape sign before each, example: "`," and "`%"
;
; "`n" ; makes a new line like "Enter"
;
!j::
Send, Shopper rules:`n- crate before attack`,`n- kill the leader`,`n- attack from rope.
Send, {Enter}
Return
!k::
Send, Forts rules:`n- no invading`,`n- no fishing.
Send, {Enter}
Return
!l::
Send, Get the latest updates from:`nhttps://worms2d.info/Updates
Send, {Enter}
Return
Yes I am using the lastest ahk
I used these guides, it's basically ther Beginner Tutorial.
https://www.autohotkey.com/docs/Tutorial.htm#s12
No need to thank, enjoy!
...dunno if you want it this way, but maybe you could use the below example to upgrade your script, so it'll eliminate the need of using the end-char to send the phrase:
:*:btw::by the way ; Replaces "btw" with "by the way" without needing an ending character.
*edit*...just tested my script and it's doing it's job really well, you can even send multi-line text with the in-game chat, while
"`n" function works a little bit differently than I initially thought...
...it creates a totally new line, not another line in the same phrase, what bypasses the max characters limit that can be typed in one phrase - I like it