I have the following code that opens an app and posts something at a specific time. It's completely dorky, it's just a silly competition my friends and I are having to see who can get it to post first at exactly noon each day.
Two primary issues. First of all, if I use "120000" for the following Timestring, the code itself takes a few seconds to run and it ends up fully executed around 12:00:03, which is too late. Currently I'm trying to circumvent this by just building in the three extra seconds, which you can see in the code below. Is there a way to get this to execute.... faster?
Tangentially, I'd also love to be able to add milliseconds to the Timestring check so I can make it even more accurate.
Any suggestions on this? I'm kinda a newb with it. Thanks so much.
Code: Select all
#Persistent
ToolTip, WAITING TO POST!
SetTimer, Timer, 1 ; check every 1 milliseconds
Return
Timer:
FormatTime, TimeString,, HHmmss
if (TimeString = "115957") ; put whatever time in 24 hour format
{
RunWait C:\Users\nusde\AppData\Local\Discord\app-1.0.9037\Discord.exe
send, https://twitter.com/GatorsDaily/status/1618979677376315393
send, {Enter}
ExitApp
}
else
{
ToolTip, WAITING FOR FLAT FUCK FRIDAY!
}
Return