You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: When you copy the second number to the clipboard (manually or programmatically) and afterwards try to receive it with get_clipboard(), you will only get 491234567890 instead of +491234567890 (spot the missing +). The first number is copied as-is.
It looks like as if somewhere on it's way from AHK to Python the clipboard content get's interpreted as a number (if possible) and as consequence looses it's plus sign.
[Var is integer] if Var is non-empty and contains a purely numeric string (decimal or hexadecimal) without a decimal point. Leading and trailing spaces and tabs are allowed. The string may start with a plus or minus sign.
— https://www.autohotkey.com/docs/v1/lib/IfIs.htm
One option is making AHKToPython return a string and converting the value in the Python code whenever ahk_call is invoked. This will break the code that uses ahk_call directly.
Another option is annotating the return types of the AHK functions and converting their results based on that.
Yet another option is not converting the value if its numerical representation differs.
Phone numbers usually look like this:
+49-1234-56 78 90
+491234567890
Problem: When you copy the second number to the clipboard (manually or programmatically) and afterwards try to receive it with
get_clipboard()
, you will only get491234567890
instead of+491234567890
(spot the missing+
). The first number is copied as-is.You might find the following examples useful.
BUG_clipboard.py
:It looks like as if somewhere on it's way from AHK to Python the clipboard content get's interpreted as a number (if possible) and as consequence looses it's plus sign.
The following Autohotkey script works fine:
The text was updated successfully, but these errors were encountered: