How can I set up a macro to send a command in a discord channel at specified times?

I’m trying to set it up so that I can activate a script on AutoHotKey that will use my discord app in the background and send a specified message every three hours. It would be best if the three hours were set on specified times, such as 12, 3, 6, 9, 12, etc.

I’m mostly having a hard time understanding the send command, but I’m sure I need information on how to get it to use the discord api properly as well, so the more you give me the better. I was going to do this using the chrome web browser and opening a tab with the discord website on there so it didn’t interfere with anything I’m doing, but I figure now that doing it through the application will be the best way.

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
Send, #
Send, c
Send, h
Send, Enter

All I got when trying this code is the windows ding sound. I have not learned enough of this stuff yet, so again, the more direction I can get here the better.

Leave a Comment