I would appreciate if you would let me know what you want for your script. My code works, but you're saying it doesn't, which means that your description is different from your desired behavior.
Can you provide more details on how you want your script to work?
Do you want to force DBVictory to become the active window every 5 minutes so that Up+Down can be sent?
Do you want to check every 5 minutes whether DBVictory is active, and if it is, then send Up+Down?
Do you want Up+Down to be sent to the window DBVictory every 5 minutes regardless of whether the window can be seen or not?
What is currently not operating or performing as intended?
Magnic wrote:I want it to work only in DBVictory window and nowhere else.
It currently does.
Magnic wrote:DBVictory is active but no matter what i do if i leave it in the background, it start working in currently open window instead of DBV.
If the code is acting on another, unintended window, then go to the very beginning of the script, press Enter or Return once, then press the Up arrow so that you're on the first line, and copy+paste the following code into that first line:
SetTitleMatchMode, 3
If it still has problems acting upon unintended windows, then I'll know exactly where those problems reside and can begin to attempt various solutions.
Magnic wrote: Also i want it to repetitively do up+down once every 5min
My code currently checks if DBVictory is the active window, and if it is, it will send Up+Down, then do nothing for 5 minutes before repeating the process.