Output current date and time with a string.

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
mave_mohiuddin
Posts: 1
Joined: 24 May 2024, 00:33
Contact:

Output current date and time with a string.

24 May 2024, 00:45

Hello good people. This may be very simple, but I've been unable to achieve it. I want to output a string the contains current date and time along with a string. Following is an example:

24/05 - You are signing in at 11:30AM

Ideally, the time and date should be bold, like ^b bold. But it's not compulsory. So far, from google search, ahk documentation, and other sources, I could output date and sting, but not time.

> ^j::SendText A_DD "/" A_MM " - You are signing in at "

It would be best if I could also include some more stuff. Following is the entire thing I would like to automate:

Output:
25/05 - You are signing in at 11:30AM

You brought with you -
1.

Afterwards, I will manully enter the list items. Thank you for your time and checking it out.
User avatar
boiler
Posts: 17404
Joined: 21 Dec 2014, 02:44

Re: Output current date and time with a string.

24 May 2024, 04:24

You must not have looked at the documentation very carefully.

Code: Select all

#Requires AutoHotkey v2.0

^j::Send FormatTime(, "dd/MM' - You are signing in at 'h:mmtt'`n`nYou brought with you - `n1. '")

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: wineguy and 60 guests