Send a word every 2 hours to an application Topic is solved
Send a word every 2 hours to an application
Hello, ive looked far and wide and all i want is a script to send a word every 2 hours to an application. Does anyone have an idea of how to accomplish this? Thanks.
Last edited by BoBo on 26 May 2022, 14:32, edited 1 time in total.
Reason: Changed title from 'Simple script' to 'Send a word every 2 hours to an application' to be more specific.
Reason: Changed title from 'Simple script' to 'Send a word every 2 hours to an application' to be more specific.
Re: Send a word every 2 hours to an application
Code: Select all
#Persistent
SetTimer, spitAword, % 2*60*60*1000
Return
spitAword:
Send whatever word ; use ControlSend instead!
Return
Re: Send a word every 2 hours to an application
replaced "whatever word" with my desired word and set it up and nothing happens. No idea if its even running or not. Sorry, i am new at this.BoBo wrote: ↑26 May 2022, 14:37Code: Select all
#Persistent SetTimer, spitAword, % 2*60*60*1000 Return spitAword: Send whatever word ; use ControlSend instead! Return
Re: Send a word every 2 hours to an application
Well, a 2h delay was your requirement. So being impatient wasn’t part of the plan, right? Right.
For testing change % 2*60*60*1000 AKA (60x1000ms = 1m x 60 = 1h x 2 = 2h) to % 0.5*60*1000 ; 30sec so you’ll see the String is getting send every half a minute. HTH
For testing change % 2*60*60*1000 AKA (60x1000ms = 1m x 60 = 1h x 2 = 2h) to % 0.5*60*1000 ; 30sec so you’ll see the String is getting send every half a minute. HTH
Re: Send a word every 2 hours to an application
Sorry I had waited for over 2 hours and nothing had sent. I'll try this next.
Edit: Nope. Wont even send to Notepad.
Re: Send a word every 2 hours to an application
So, what's your target application? (Have you used ControlSend instead of Send, or have you used my code exactly as it is given here?)
Feel free to replace Send with SoundBeep for testing.
Feel free to replace Send with SoundBeep for testing.
Re: Send a word every 2 hours to an application
Elsword. I want to remind my guild teammates to do dailies every two hours. I tried ControlSend right before I sent the edit on Notepad. The cursor stops blinking until i click it again tho.
Re: Send a word every 2 hours to an application
Games responsiveness is different. You have to do some trial & error regarding the different flavor of Send-commands, the target controls focus setting etc.
If you use a SoundBeep instead of Send you'll "see" that there's no problem on the timing part of this script (check out AHK’s Help about SetTimer).
If you use a SoundBeep instead of Send you'll "see" that there's no problem on the timing part of this script (check out AHK’s Help about SetTimer).
Re: Send a word every 2 hours to an application
Even just using it on Notepad, nothing is sent or written so i dont know what is going on. Am i doing something wrong?BoBo wrote: ↑28 May 2022, 00:29Games responsiveness is different. You have to do some trial & error regarding the different flavor of Send-commands, the target controls focus setting etc.
If you use a SoundBeep instead of Send you'll "see" that there's no problem on the timing part of this script (check out AHK’s Help about SetTimer).
Re: Send a word every 2 hours to an application Topic is solved
Found a different application that makes it work.Jenova wrote: ↑28 May 2022, 00:41Even just using it on Notepad, nothing is sent or written so i dont know what is going on. Am i doing something wrong?BoBo wrote: ↑28 May 2022, 00:29Games responsiveness is different. You have to do some trial & error regarding the different flavor of Send-commands, the target controls focus setting etc.
If you use a SoundBeep instead of Send you'll "see" that there's no problem on the timing part of this script (check out AHK’s Help about SetTimer).