Good Day Im using the Following code:
::ddd::
FormatTime, CurrentDateTime,, MMM
SendInput %CurrentDateTime%
return
I use the regional settings in my Country "Mexico"
The problem is that the Month comes out with an abbreviation "Period"...For example this month is December and im getting "dic." and i need it to be "dic" or "Dic"
Anyone know how i can fix this ?=
Using AHK to get the current Month
Re: Using AHK to get the current Month
Code: Select all
::ddd::
FormatTime, CurrentDateTime,, MMM
SendInput % StrReplace(CurrentDateTime, ".")
return
Re: Using AHK to get the current Month
or with language code España
Code: Select all
;https://www.autohotkey.com/docs/misc/Languages.htm
;https://www.science.co.il/language/Locale-codes.php
;-
;time=20221201141500
;time:=a_now
time:=a_nowutc
FormatTime,Frysland , %time% L0x0462, dddd MMM MMMM yyyy-MM-dd HH:mm ;- Fryslân
FormatTime,konkani , %time% L0x0457, dddd MMM MMMM yyyy-MM-dd HH:mm ;- Goemcho
FormatTime,Mexico , %time% L0x080a, dddd MMM MMMM yyyy-MM-dd HH:mm ;- Mexico
FormatTime,Spain , %time% L1034 , dddd MMM MMMM yyyy-MM-dd HH:mm ;- España
msgbox,Fryslân=%frysland%`nKonkani=%konkani%`nMexico=%mexico%`nEspaña =%spain%
/*
Fryslân= woansdei Des Desimber 2022-12-07 21:49
Konkani= बुधवार डिसें डिसेंबर 2022-12-07 21:49
Mexico = miércoles dic. diciembre 2022-12-07 21:49
España = miércoles dic diciembre 2022-12-07 21:49
*/
Re: Using AHK to get the current Month
Used the Following Code based of you Answer
If you run it Today for Example
Gets the currrent date - Output "10dic.2022"
Creates variable '"_STLs_"
Fixed Date by removing "." Output "10dic2022"
Outputs Both Variables - "_STLs_10dic2022"
Thanks for the Help!
Code: Select all
F3::
FormatTime, CurrentDateTime,, ddMMMyyyy
Tipo := "_STLs_"
FixedDate := StrReplace(CurrentDateTime, ".")
SendInput, %Tipo%
SendInput, %FixedDate%
return
Gets the currrent date - Output "10dic.2022"
Creates variable '"_STLs_"
Fixed Date by removing "." Output "10dic2022"
Outputs Both Variables - "_STLs_10dic2022"
Thanks for the Help!
Re: Using AHK to get the current Month
also
Code: Select all
F3::
FormatTime,Cdt,L1034,ddMMMyyyy
send,{text}_STLs_%cdt% ;- _STLs_10dic2022