Boilerplate current time Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
Chrix
Posts: 4
Joined: 15 Apr 2024, 23:30

Boilerplate current time

Post by Chrix » 15 Apr 2024, 23:34

Hello,

havn't figured out by myself.

::,time:: order put in current time

Goal: I wonna have the current time for example 13:03 (HH:mm), when i enter the text ",time".

Thanks for help

Christian

ntepa
Posts: 429
Joined: 19 Oct 2022, 20:52

Re: Boilerplate current time  Topic is solved

Post by ntepa » 16 Apr 2024, 01:15

Code: Select all

#Requires AutoHotkey v2.0 

:X*?:,time::SendText(FormatTime(, "HH:mm"))
Last edited by ntepa on 16 Apr 2024, 01:17, edited 1 time in total.

Rohwedder
Posts: 7659
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Boilerplate current time

Post by Rohwedder » 16 Apr 2024, 01:15

Hallo,
perhaps?:

Code: Select all

:?*X:,time::Send A_Hour ":" A_Min

Chrix
Posts: 4
Joined: 15 Apr 2024, 23:30

Re: Boilerplate current time

Post by Chrix » 17 Apr 2024, 07:58

ntepa wrote:
16 Apr 2024, 01:15

Code: Select all

#Requires AutoHotkey v2.0 

:X*?:,time::SendText(FormatTime(, "HH:mm"))
Thanks for you help. Its working in my V2.

Here what i put up for me

Code: Select all

:X*?:,zeitjetzt::SendText(FormatTime(, "HH:mm"))
:X*?:,heute::SendText(FormatTime(, "dd.MM.yyyy"))
:X*?:,punkt::SendText(FormatTime(, "HH:mm dd.MM.yyyy"))
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code!]

Chrix
Posts: 4
Joined: 15 Apr 2024, 23:30

Re: Boilerplate current time

Post by Chrix » 17 Apr 2024, 08:00

Rohwedder wrote:
16 Apr 2024, 01:15
Hallo,
perhaps?:

Code: Select all

:?*X:,time::Send A_Hour ":" A_Min
Thanks for your quick answer to. I'm using V2 here it seems not to work. The answer of ntepa worked.

gregster
Posts: 9037
Joined: 30 Sep 2013, 06:48

Re: Boilerplate current time

Post by gregster » 17 Apr 2024, 08:40

Chrix wrote:
17 Apr 2024, 08:00
Rohwedder wrote:
16 Apr 2024, 01:15
Hallo,
perhaps?:

Code: Select all

:?*X:,time::Send A_Hour ":" A_Min
Thanks for your quick answer to. I'm using V2 here it seems not to work. The answer of ntepa worked.
Should work in v2. Add #Requires AutoHotkey v2.0 and try again (because if you have also installed v1, this hotstring code is likely too ambigious for the launcher).

Chrix
Posts: 4
Joined: 15 Apr 2024, 23:30

Re: Boilerplate current time

Post by Chrix » 21 Apr 2024, 20:12

gregster wrote:
17 Apr 2024, 08:40
Chrix wrote:
17 Apr 2024, 08:00
Rohwedder wrote:
16 Apr 2024, 01:15
Hallo,
perhaps?:

Code: Select all

:?*X:,time::Send A_Hour ":" A_Min
Thanks for your quick answer to. I'm using V2 here it seems not to work. The answer of ntepa worked.
Should work in v2. Add #Requires AutoHotkey v2.0 and try again (because if you have also installed v1, this hotstring code is likely too ambigious for the launcher).
Thanks your hint. It was already added

Code: Select all

#Requires Autohotkey v2.0+
by the test of your example.
I let it now by the other solution like mentioned. Thanks for your time

Post Reply

Return to “Ask for Help (v2)”