Probleme pour fusionner 2 script Topic is solved

Poser vos questions de programmation en AutoHotkey
Azza75

Probleme pour fusionner 2 script

09 Feb 2021, 11:53

Bonjour,

Je ne parviens pas a fusionner ces 2 scripts :

Le premier me permet de maintenir LButton et RButton

Code: Select all

~*$XButton2::
Sendinput {LButton Down}{RButton Down}
Keywait, XButton2	    
Send {LButton Up}{RButton Up}
return
Le second de créer une boucle pour les touche q et d

Code: Select all

~*$XButton2::   
    loop
    While GetKeyState("XButton2","P")
    {
    SendInput {d down}	    
    sleep, 500
    Sendinput {d up}
    sleep, 100
    Sendinput {q down}
    sleep, 500
    SendInput {q up}
    sleep, 100
    }

return
[Mod edit: [code][/code] tags added.]

J'aimerais donc que lorsque d’appuis sur XButton2 les 2 click de la souris sois enfoncer tout en répétant la boucle ci dessus.

Merci d'avance !!
User avatar
joedf
Posts: 8953
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Probleme pour fusionner 2 script  Topic is solved

09 Feb 2021, 17:18

Tu peux tout simplement faire ceci :thumbup:

Code: Select all

~*$XButton2::   
    Sendinput {LButton Down}{RButton Down}
    While GetKeyState("XButton2","P")
    {
    SendInput {d down}	    
    sleep, 500
    Sendinput {d up}
    sleep, 100
    Sendinput {q down}
    sleep, 500
    SendInput {q up}
    sleep, 100
    }
    Send {LButton Up}{RButton Up}
return
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

Return to “J'ai besoin d'aide”

Who is online

Users browsing this forum: No registered users and 67 guests