problem with press ctrl + arrow key every 10min

Ask gaming related questions (AHK v1.1 and older)
tadeuszponczuszko
Posts: 1
Joined: 15 Oct 2017, 02:25

problem with press ctrl + arrow key every 10min

15 Oct 2017, 02:32

hello

Im looking for script which will press ctrl and up arrow key then wait 1 second and press ctrl and down arrow key then wait 14 mins and repeat.
It have to press both ctrl and up arrow key in the same time. same with ctrl and down arrow key.
I did with something like this but it just press up and down arrow key without holding the ctrl key.

Code: Select all

SetTitleMatchMode 2
SetTitleMatchMode Slow
SendMode Input

;
; Start script running using CTRL+L
; Pause script using ALT+L
;

!l::pause
^l::

;
; Start of the script and also used as the goto point
;

Start:

;
; Set the name of the window you want the script to run in
;

WindowName := "game"


#Persistent
SetTimer, DBL, 1400000
return

DBL:
ControlSend, , ^{Up}, game
sleep, 1000
ControlSend, , ^{Down}, game

;
; Used goto instead of a loop as this allows us to easily check if the window is still activated
;

goto, start
User avatar
Reloaded
Posts: 283
Joined: 25 Aug 2017, 08:48

Re: problem with press ctrl + arrow key every 10min

15 Oct 2017, 06:36

Hey, maybe this Help you ! :)

Code: Select all

SetTitleMatchMode 2
SetTitleMatchMode Slow

;------------------------------------------------------------------------------;

q::					;With "Q" you start the Script.

Send, ^{Up}				;This send Ctrl and up, sleep for 1 Sec and send Ctrl down Sleep, for 14 Mins and 
Sleep, 1000
Send, ^{Down}
Sleep, 14000
return

;------------------------------------------------------------------------------;

w::					;With "W" you start the Script.

Send, ^a{Up}				;This send Ctrl and arrow up	

;------------------------------------------------------------------------------;

e::					;With "E" you start the Script.

Send, ^a{Down}				;This send Ctrl and arrow down

;------------------------------------------------------------------------------;

;;									;;;
;;	YOU CAN CHANGE THE "Q" "W" "E" TO WHATEVER YOU WANT!!!		;;;
;;									;;;

;------------------------------------------------------------------------------;

F1::					;And with "F1" you pause the Script 
   Suspend, Permit
   SusToggle := !SusToggle
   If (SusToggle)
   {   Suspend, On
   }
   Else
   {   Suspend Off
   }
   Return
				
;------------------------------------------------------------------------------;

g::Reload				;And with "G" you reload the Script 

bydlak100
Posts: 3
Joined: 10 Oct 2017, 00:01

Re: problem with press ctrl + arrow key every 10min

20 Oct 2017, 12:29

thanks for the answer but it doesn't work the way I need.

simply script which will use controlsend so I could minimize the game.
Hold left ctrl, press arrow up wait 1 second then arrow down and release left ctrl then wait 10 mins and loop
bydlak100
Posts: 3
Joined: 10 Oct 2017, 00:01

Re: problem with press ctrl + arrow key every 10min

21 Oct 2017, 09:09

okay I made it

Code: Select all

SetTitleMatchMode 2
SetTitleMatchMode Slow
SendMode Input

;------------------------------------------------------------------------------;

F11::					;With "Q" you start the Script.
WindowName := "dbl"
loop
{
IfWinExist, dbl
WinActivate ; use the window found above
sleep, 3000
Send, ^{Up}				;This send Ctrl and up, sleep for 1 Sec and send Ctrl down Sleep, for 14 Mins and 
Sleep, 100
Send, ^{Down}
Sleep, 600000
}
return

F12::
Pause
return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 44 guests