Two remap key scripts with delay Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
wyw
Posts: 93
Joined: 12 Dec 2015, 19:11

Two remap key scripts with delay

22 Oct 2018, 08:04

Code: Select all

#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.
~RButton::Space
~XButton2::~RButton



~F1::Suspend
~f7::ExitApp
Second:

Code: Select all

#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.
~RButton::MButton



~F1::Suspend
~f7::ExitApp

That are my remap scripts. Don't know if possible, but what I want to do, or rather what I need to do is, when it comes to ~RButton::Space, it shouldn't immediately hold/press "Space" at the same time, but 30ms after. So there should basically be a small delay that'll make sure RButton comes before Space. This should not affect ~RButton::MButton though, everything is fine with that.


Possible with remap scripts? Or do I have to switch to send? Hopefully not......
Rohwedder
Posts: 7627
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Two remap key scripts with delay  Topic is solved

22 Oct 2018, 08:37

Hallo,
replace:

Code: Select all

~RButton::Space
by:

Code: Select all

~*Rbutton::
	Sleep, 30
	Send,{Blind}{Space DownR}
Return
~*Rbutton Up::Send,{Blind}{Space Up}
wyw
Posts: 93
Joined: 12 Dec 2015, 19:11

Re: Two remap key scripts with delay

24 Oct 2018, 15:45

Rohwedder wrote:
22 Oct 2018, 08:37
Hallo,
replace:

Code: Select all

~RButton::Space
by:

Code: Select all

~*Rbutton::
	Sleep, 30
	Send,{Blind}{Space DownR}
Return
~*Rbutton Up::Send,{Blind}{Space Up}
Sorry for the late response buddy. Thanks for your help!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, DiegoSouto, mikeyww, Rohwedder, Sniperman, Swiftly9767 and 389 guests