Making chat messages repeat every ten minutes

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
braigwen
Posts: 3
Joined: 23 Feb 2018, 00:59

Making chat messages repeat every ten minutes

23 Feb 2018, 01:06

I have several hot keys for the Twitch chat I mod for, but I have one that I would like to repeat every ten minutes. Is there a way I can do that?

Code: Select all

f10::send, Any and all thelorMan schedule questions can be answered by http://lorerunner.com/ If you're on moble, make sure you aren't zoomed in. Bookmark it for easy answers to all your stream questions.{Enter}
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Making chat messages repeat every ten minutes

23 Feb 2018, 04:58

Code: Select all

Msg := "Any and all thelorMan schedule questions can be answered by http://lorerunner.com/ If you're on mobile, make sure you aren't zoomed in. Bookmark it for easy answers to all your stream questions."
SetTimer, Reminder,% 1000 * 60 * 10   ; every 10 minutes (1000ms x 60 = 1min x 10 = 10min)
Return

Reminder:
   #IfWinActive <chatID>   ; click on this command to get further info about its parameter
   ; ControlFocus, ...
   Send, %Msg% {Enter}
   #IfWinActive
   Return
Not tested.
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: Making chat messages repeat every ten minutes

23 Feb 2018, 05:02

Why the directive #Ifwinactive? I don't see any hotkeys or hotstrings... Perhaps the command IfWinActive instead?
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Making chat messages repeat every ten minutes

23 Feb 2018, 05:57

BoBo wrote:

Code: Select all

Msg := "Any and all thelorMan schedule questions can be answered by http://lorerunner.com/ If you're on mobile, make sure you aren't zoomed in. Bookmark it for easy answers to all your stream questions."
SetTimer, Reminder,% 1000 * 60 * 10   ; every 10 minutes (1000ms x 60 = 1min x 10 = 10min)
Return

Reminder:
   #IfWinActive <chatID>   ; click on this command to get further info about its parameter
   ; ControlFocus, ...
   Send, %Msg% {Enter}
   ; ControlSend, ... better to use this instead 
   #IfWinActive
   Return
Not tested.
Question:
1) Why is there a % before 1000 * 60 * 10?
2) IfWinActive or #IfWinActive? as mentioned.
3) Why is there a second IfWinActive after send %Msg%?

thanks
I am your average ahk newbie. Just.. a tat more cute. ;)
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Making chat messages repeat every ten minutes

23 Feb 2018, 06:04

1) :arrow: [ % ]
2) IfWinActive would have been correct bc you don't use a hotkey anymore :thumbup:
3) check the AHK help for the reason (as advised within the codebox above)
braigwen
Posts: 3
Joined: 23 Feb 2018, 00:59

Re: Making chat messages repeat every ten minutes

23 Feb 2018, 14:18

The program has accepted the code, yet it doesn't post the message at all. Is there something special I have to do? I can't make heads or tails of the walkthroughs. Total newbie.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput and 289 guests