Why does the Send command send multiple characters when I have only specified one character? Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
milan_tom
Posts: 2
Joined: 14 Dec 2019, 11:13

Why does the Send command send multiple characters when I have only specified one character?

14 Dec 2019, 11:19

Here is the code that I am using:

Code: Select all

!0:: 
Send ➔
Return
This returns the following string: âž”. Moreover, it does not work when I use the number pad to type 0 rather than the top row. Why is this and how can I resolve this?
User avatar
joedf
Posts: 7418
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

Re: Why does the Send command send multiple characters when I have only specified one character?  Topic is solved

14 Dec 2019, 11:21

That's a Unicode character and might be interpreted as two characters in places that don't support Unicode or if the wrong encoding scheme is used.
Make sure to save your script with UTF8 BOM and run it with Ahk Unicode.
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x8GB G.Skill RipJaws V - DDR4 3280 MHz | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]
gregster
Posts: 3747
Joined: 30 Sep 2013, 06:48

Re: Why does the Send command send multiple characters when I have only specified one character?

14 Dec 2019, 12:47

milan_tom wrote:
14 Dec 2019, 11:19
Moreover, it does not work when I use the number pad to type 0 rather than the top row. Why is this and how can I resolve this?
The 0 from Numpad is a different key: You may add it like this (assuming Numlock is on):

Code: Select all

!Numpad0::
!0:: 
Send ➔
Return
please compare https://www.autohotkey.com/docs/KeyList.htm#numpad
milan_tom
Posts: 2
Joined: 14 Dec 2019, 11:13

Re: Why does the Send command send multiple characters when I have only specified one character?

14 Dec 2019, 14:30

This solves the number pad issue, but the shortcut still outputs the string: âž” rather than the arrow in the code.

Return to “Ask For Help”

Who is online

Users browsing this forum: bennybroseph, Bing [Bot], Google [Bot], theholyscripture and 54 guests