Code: Select all
;ONLY COUNT
ini := StrReplace(A_ScriptFullPath, ".ahk", ".ini"), track := "Track"
IniRead, year , %ini%, %track%, year
IniRead, month, %ini%, %track%, month
IniRead, runs , %ini%, %track%, runs, 0
If (year != A_YYYY || month != A_MM) {
IniWrite, %A_YYYY% , %ini%, %track%, year
IniWrite, %A_MM% , %ini%, %track%, month
IniWrite, % runs := 1, %ini%, %track%, runs
} Else IniWrite, % ++runs , %ini%, %track%, runs
;WITH MONTH
lastMonth := lastMonth("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Spt", "Oct", "Nov", "Dec")
;MsgBox %lastMonth%
lastMonth(list*) ;this way you can decide how the element should count back.i.e a string like Feb, or 02...
{
Index := A_Mon -0
lastMon .= list[Index]
Return, %lastMon%
; Return, list[Index] ;to only return the month
}
;DISPLAY IN MSGBOX
MsgBox , 0, Runs - %runs%
I want ahk to
1.First enter the current date ( in the format - 04-Aug-2021)
2.copy any other text of my choice ( this I will do manually )
3.and on sending ctrl v ,
the date should get entered,
msgbox contents should get pasted first,
a gap of two lines should be given
and then the text that I would have copied should get pasted
eg.
04-Aug-2021
Runs 10 ( Runs - %runs%)
"gap"
"gap"
(the text I copied manually)
can someone please help/guide me ?
ps. I will paste all of the above into a chat service (sms e.t.c)