Input command selective visible Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

Input command selective visible

04 Oct 2016, 02:44

Code: Select all

Input,k,V L1 T0.213
If (ErrorLevel = "Max")
{
	If (k = "s")
		Send n
}
I want to make the key "invisible" only if k = "s" but the others keys is "visible"
How to implement this kind of idea ?

My current worst solution is add delay before "Send n"

Code: Select all

~c::
Input,k,V L1 T0.213
If (ErrorLevel = "Max")
{
	If (k = "s")
	{
		Sleep 255
		Send n
	}
}
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: Input command selective visible

04 Oct 2016, 10:03

I would do it like this...

Code: Select all

Input,k,L1 T0.213
If (ErrorLevel = "Max") And (k != "s")
	Send %k%
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: Input command selective visible

04 Oct 2016, 10:49

Shadowpheonix wrote:I would do it like this...

Code: Select all

Input,k,L1 T0.213
If (ErrorLevel = "Max") And (k != "s")
	Send %k%
I already did it, Send % k wouldn't work.
When the Input is "Invisible" I need to Send %k%k% to do what I need
It would be looks like..

Code: Select all

~c::
Send c ;~ Here must be press c twice, otherwise script won't work. and this cause a lot of weird problems...
Input,k,L1 T0.213
If (k = "s")
	Send n
Else
	Send %k%%k%
Return
~v::
Send v ;~ Here must be press v twice, otherwise script won't work. and this cause a lot of weird problems...
Input,k,L1 T0.213
If (k = "s")
	Send m
Else
	Send %k%%k%
Return
I dont know why...Just when I removed the "V" flag away from "Input" this script works really really weird....
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: Input command selective visible

04 Oct 2016, 10:59

I thought the best solution is KeyWait :headwall: , but I hope I can do this in future.

Code: Select all

Input,k,V Sasd L1 T0.213
If (k = "a")
	Send n
If (k = "s")
	Send n
If (k = "d")
	Send n
S is "Selector" for "Input Command", It would ignore by AHK...Such thing :trollface:


Current bad sol.

Code: Select all

~c::
Input,k,V L1 T0.213
If (k = "s") {
	KeyWait s
	Send n
}
Return
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Input command selective visible  Topic is solved

04 Oct 2016, 12:23

You could use s::return, but it would have to be a registered hotkey, as a hooked hotkey wouldn't be visible for the input command either. So it can't be a conditional hotkey (#If), but disabling it dynamically (Hotkey, s, toggle) would probably work.
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: Input command selective visible

04 Oct 2016, 21:27

Nextron wrote:You could use s::return, but it would have to be a registered hotkey, as a hooked hotkey wouldn't be visible for the input command either. So it can't be a conditional hotkey (#If), but disabling it dynamically (Hotkey, s, toggle) would probably work.
Really nice ! I dont even know I can suspend a hotkey :headwall: :headwall: :headwall:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], Marium0505, mcl and 338 guests