V
V
vano27042020-11-22 16:35:53
autohotkey
vano2704, 2020-11-22 16:35:53

How to make a key press at a specific time?

I need help writing a script:
So that I set the time at which the "G" key or any other key should be pressed, and when this time comes, the G key is pressed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wisgest, 2020-11-22
@vano2704

Gui Add, Text,, Время действия:
Gui Add, DateTime, vDateTime, yyyy-MM-dd HH:mm:ss
Gui Add, Button, Section Default gAction, OK
Gui Add, Button, YS gExitApp, Отмена
Gui Show
Exit

Action:
Gui Submit, NoHide
DelayInSeconds = %DateTime%
EnvSub DelayInSeconds, A_Now, seconds
IfLess DelayInSeconds, 0, {
  MsgBox Выбрано значение в прошлом!
  Exit
}
Gui Destroy
Sleep DelayInSeconds * 1000
Send G

GuiClose:
GuiEscape:
ExitApp:
ExitApp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question