Help with number formattimg

Get help with using AutoHotkey and its commands and hotkeys
recyclingeek
Posts: 36
Joined: 19 Apr 2020, 18:27

Help with number formattimg

Post by recyclingeek » 18 May 2020, 17:14

Hello,
the !c and !p are suppose to stand for Alt p and Alt c which are the commands that i need, and the numbers are suppose to stand for a dollar amount, i want add pennies into consideration.
for example right now, when i type
1100ok it triggers Alt p $1,100 Alt c

I want
1100ok to trigger Alt p $11.00 Alt c
the code is not taking pennies into consideration

Code: Select all

~1::
~2::
~3::
~4::
~5::
~6::
~7::
~8::
~9::
~0::No .= SubStr(A_ThisHotkey,0)
:*?:ok::
SoundBeep
IF No
	Send,% "{BS " StrLen(No) "}`t!p" Format("{:.2f}", No/100) "`t!c"
Else
	Send, !P!C
No =
Return
[Mod edit: [code][/code] tags and provisional topic name added.]

Return to “Ask For Help”