Random key presses held down
Re: Random key presses held down
i dont understand those things, if you know how to help then please help
Re: Random key presses held down
I don’t see how you can say that. You already created a script that has hotkeys. This would be very similar to that because the suggestion was to add a hotkey, not change an existing one. So first, choose a key. Let’s say it’s the Tab key. So you would create a new line like the one you have for the Escape key. But you would replace esc with the new key name. And you would replace exitapp with the command you were shown that you would use. You can take it from here.
Re: Random key presses held down
@kyubi85 was not the OP on this thread and didn't create the esc hotkey. Here ya go:
Russ
Code: Select all
\::
Random, frequency, 100, 3000
Random, afterKeyUp, 500, 3000
SetTimer, PressTheKey, %frequency%
PressTheKey:
SetKeyDelay, afterKeyUp, 500
Random, key,, 1 ; 0 or 1
Send % key ? "q" : "z" ; 0 -> z, 1 -> q
Return
Esc::SetTimer, PressTheKey, Off
Last edited by RussF on 05 Jun 2023, 08:57, edited 1 time in total.
Re: Random key presses held down
Thanks a lot, one more thing, a want it to have "u" "i" "o" as random keys
Re: Random key presses held down
You’re right. I missed that, but the answers were still there in direct response to his questions including the links to the documentation link, so I still would have preferred to see kyubi85 produce the line, especially after my last post that basically spelled it out.
Re: Random key presses held down
I understand your point and don't necessarily disagree, however, it seems clear that @kyubi85 has virtually no coding experience (no disrespect to @kyubi85 intended). Remembering when I first discovered AHK, even with a lifetime of coding experience, the syntax was somewhat confusing. If one has absolutely no understanding of how programming works, but just needs to get something done, it can be daunting. I'm fully in favor of "teaching a person to fish", but sometimes you have to give them a few while they are learning.boiler wrote: so I still would have preferred to see kyubi85 produce the line, especially after my last post that basically spelled it out.
Code: Select all
\::
Random, frequency, 100, 3000
Random, afterKeyUp, 500, 3000
SetTimer, PressTheKey, %frequency%
PressTheKey:
SetKeyDelay, afterKeyUp, 500
Random, key,, 2 ; 0, 1 or 2
Switch key
{
Case 0: Send u
Case 1: Send i
Case 2: Send o
}
Return
Esc::SetTimer, PressTheKey, Off
F10::ExitApp
Re: Random key presses held down
Thanks and thats all
Re: Random key presses held down
Those are good points, and I agree. If I hadn’t mistakenly thought these questions were coming from the OP, I may have been more sensitive to that, so I will own up to the fact that I should have been better in that regard here. Thank you for pointing that out.RussF wrote: ↑ I understand your point and don't necessarily disagree, however, it seems clear that @kyubi85 has virtually no coding experience (no disrespect to @kyubi85 intended). Remembering when I first discovered AHK, even with a lifetime of coding experience, the syntax was somewhat confusing. If one has absolutely no understanding of how programming works, but just needs to get something done, it can be daunting. I'm fully in favor of "teaching a person to fish", but sometimes you have to give them a few while they are learning.