Script complexe pour 2 touches

Poser vos questions de programmation en AutoHotkey
6zerox
Posts: 16
Joined: 31 Jan 2023, 17:53

Re: Script complexe pour 2 touches

Post by 6zerox » 01 Feb 2023, 20:05

Hum i am sory but doesn t work like i would like
"SetTimer, timer, 10" this line is to modify how many time between two M it's exacltly ?
But i really need only one M push and after when i press f that is up ^^
I

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Script complexe pour 2 touches

Post by DuckingQuack » 01 Feb 2023, 20:14

I'm having difficulty understanding what output you want. Please type it like this.
DuckingQuack wrote:
01 Feb 2023, 18:24
The output of this script when you press "f" and wait a few seconds and press "f" again is:
(La sortie de ce script lorsque vous appuyez sur "f" et attendez quelques secondes et appuyez à nouveau sur "f" est) :
pmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmp
Like:
Press f: pm Press f: p Press f: pm
Best of Luck,
The Duck

6zerox
Posts: 16
Joined: 31 Jan 2023, 17:53

Re: Script complexe pour 2 touches

Post by 6zerox » 01 Feb 2023, 20:31

I would like the same output but not by this way 😂 it’s really important the M stay down if i didn’t press F Again
So with that i would like that will doing pmmmmmmmp… but not by same way you see ?

6zerox
Posts: 16
Joined: 31 Jan 2023, 17:53

Re: Script complexe pour 2 touches

Post by 6zerox » 01 Feb 2023, 20:31

I would like the same output but not by this way 😂 it’s really important the M stay down if i didn’t press F Again
So with that i would like that will doing pmmmmmmmp… but not by same way you see ?
Because if i understand your script it’s when press F that press P and One M each 10 ms but that is not same for me

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Script complexe pour 2 touches

Post by DuckingQuack » 01 Feb 2023, 20:49

Yes, the 10 is the frequency of the m being sent in milliseconds. Increasing this number will slow the speed at which they are sent. 200 is 5 times per second.
(Oui, le 10 est la fréquence du m envoyé en millisecondes. L'augmentation de ce nombre ralentira la vitesse à laquelle ils sont envoyés. 200 c'est 5 fois par seconde.)
6zerox wrote:
01 Feb 2023, 20:05
Hum i am sory but doesn t work like i would like
"SetTimer, timer, 10" this line is to modify how many time between two M it's exacltly ?
But i really need only one M push and after when i press f that is up ^^
I
I suggest reading the documentation so that you better understand how the down/up keystrokes function.
(Je vous suggère de lire la documentation afin de mieux comprendre le fonctionnement des touches bas/haut.)

https://www.autohotkey.com/docs/v1/lib/Send.htm
To hold down or release a key: Enclose in braces the name of the key followed by the word Down or Up. For example:

Code: Select all

Send {b down}{b up}
Send {TAB down}{TAB up}
Send {Up down}  ; Press down the up-arrow key.
Sleep 1000  ; Keep it down for one second.
Send {Up up}  ; Release the up-arrow key.
When a key is held down via the method above, it does not begin auto-repeating like it would if you were physically holding it down (this is because auto-repeat is a driver/hardware feature). However, a Loop can be used to simulate auto-repeat.
Best of Luck,
The Duck

6zerox
Posts: 16
Joined: 31 Jan 2023, 17:53

Re: Script complexe pour 2 touches

Post by 6zerox » 01 Feb 2023, 20:54

So if i understand that i want is really impossible 😮
Because ahk cant stay down on one touch but just can repeat that touch to simulate it

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Script complexe pour 2 touches

Post by DuckingQuack » 01 Feb 2023, 21:31

I tried to explain that earlier today but I was unclear.
DuckingQuack wrote:
01 Feb 2023, 11:14
I can fix that, virtual keys don’t continuously send their key as if you were holding the button down because the keyboard does that. So I’ll add a repeated “m” to the script.
Best of Luck,
The Duck

6zerox
Posts: 16
Joined: 31 Jan 2023, 17:53

Re: Script complexe pour 2 touches

Post by 6zerox » 02 Feb 2023, 06:51

Yes when you explain that i though that was Because you dont know how to do it but it’s just impossible
Thanks a lot for your help

Post Reply

Return to “J'ai besoin d'aide”