S
S
Stas Grib2021-06-09 17:40:38
autohotkey
Stas Grib, 2021-06-09 17:40:38

How to auto-click on a button without delay?

There is a code that I found here, I need to be the first in the application to press the Enter button at a certain time, without delays in ml seconds. I searched but did not find how to do it, here is the code:
Gui Add, Text,, Action time:
Gui Add, DateTime, vDateTime, yyyy-MM-dd HH:mm:ss
Gui Add, Button, Section Default gAction, OK
Gui Add, Button, YS gExitApp, Cancel
Gui Show
Exit

Action:
Gui Submit, NoHide
DelayInSeconds = %DateTime%
EnvSub DelayInSeconds, A_Now, seconds
IfLess DelayInSeconds, 0, {
MsgBox Value selected in the past!
Exit
}
Gui Destroy
Sleep DelayInSeconds * 1000
Send {enter}

GuiClose:
GuiEscape:
ExitApp:
ExitApp

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question