muchas gracias

Esta sección es para preguntas sobre programación/scripting usando AutoHotkey.

Moderator: Flipeador

Thorx
Posts: 98
Joined: 23 Nov 2015, 18:53

muchas gracias

13 Dec 2015, 12:08

OR ... gracias
Last edited by Thorx on 14 Aug 2016, 22:10, edited 2 times in total.
User avatar
Flipeador
Posts: 1204
Joined: 15 Nov 2014, 21:31
Location: Argentina
Contact:

Re: UNIR 3 MACROS EN UN SOLO AHK

13 Dec 2015, 13:45

Hola,
la próxima usa la etiqueta "Code".
(sin probar)

Code: Select all

#NoEnv
SetBatchLines, -1
SetMouseDelay, -1
SetKeyDelay, -1

F4::ExitApp

~|::
Suspend, Toggle
SoundPlay, % A_IsSuspended?"*64":"*84"
return

Left:: ;1
try Hotkey, ~LButton, On
Hotkey, ~LButton, M1
Hotkey, ~^LButton, M1
return

Down:: ;2
try Hotkey, ~LButton, On
Hotkey, ~LButton, M2
Hotkey, ~^LButton, M2
return

Right:: ;3
try Hotkey, ~LButton, Off
Hotkey, ~^LButton, M3
return

;#1
M1:
;ToolTip 1
while GetKeyState("LBUTTON", "P") {
	SendInput, {LBUTTON DOWN}
	Random, rand, 25.48019, 35
	Sleep, %rand%
	SendInput, {LBUTTON UP}
	Sleep, 70
}
return

;#2
M2:
;ToolTip 2
while GetKeyState("LBUTTON", "P") {
	SendInput, {LBUTTON DOWN}
	Random, rand, 25.48019, 35
	Sleep, %rand%
	SendInput, {LBUTTON UP}
	Sleep, 100.8019
}
return

;#3
M3:
;ToolTip 3
SendInput, {LBUTTON DOWN}
SendInput, {LBUTTON UP}
SendInput, {q DOWN}
SendInput, {q UP}
SendInput, {q DOWN}
SendInput, {q UP}
return
Saludos!
Thorx
Posts: 98
Joined: 23 Nov 2015, 18:53

muchas gracias

13 Dec 2015, 19:28

muchas gracias
Last edited by Thorx on 14 Aug 2016, 22:10, edited 1 time in total.
User avatar
Flipeador
Posts: 1204
Joined: 15 Nov 2014, 21:31
Location: Argentina
Contact:

Re: UNIR 3 MACROS EN UN SOLO AHK

13 Dec 2015, 20:22

inicia el script y preciona la flecha derecha.
luego debería de funcionar con CTRL+CliC.

el macro 3 seria este que me pusiste, ¿no?:

Code: Select all

#NoEnv
~|::suspend
F4::ExitApp
~*LButton::
Send {LButton down}
Send {LButton up}
Send {q down}
Send {q up}
Send {q down}
Send {q up}
return
¿te funciona ese script?
pues es exactamente lo mismo que puse yo... prueba este:

Code: Select all

#NoEnv
SetBatchLines, -1
SetMouseDelay, -1
SetKeyDelay, -1
 
F4::ExitApp
 
~|::
Suspend, Toggle
SoundPlay, % A_IsSuspended?"*64":"*84"
return
 
Left:: ;1
Hotkey, ~LButton, M1, On
Hotkey, ~^LButton, M1, On
return
 
Down:: ;2
Hotkey, ~LButton, M2, On
Hotkey, ~^LButton, M2, On
return
 
Right:: ;3
try Hotkey, ~LButton, Off
Hotkey, ~^LButton, M3, On
return
 
;#1
M1:
;ToolTip 1
while GetKeyState("LBUTTON", "P") {
	SendInput, {LBUTTON DOWN}
	Random, rand, 25.48019, 35
	Sleep, %rand%
	SendInput, {LBUTTON UP}
	Sleep, 70
}
return
 
;#2
M2:
;ToolTip 2
while GetKeyState("LBUTTON", "P") {
	SendInput, {LBUTTON DOWN}
	Random, rand, 25.48019, 35
	Sleep, %rand%
	SendInput, {LBUTTON UP}
	Sleep, 100.8019
}
return
 
;#3
M3:
;ToolTip 3
SendInput, {LButton}
Sleep, 10
SendInput, q
Sleep, 10
SendInput, q
return
Thorx
Posts: 98
Joined: 23 Nov 2015, 18:53

muchas gracias

13 Dec 2015, 20:39

muchas gracias
Last edited by Thorx on 14 Aug 2016, 22:10, edited 1 time in total.
User avatar
Flipeador
Posts: 1204
Joined: 15 Nov 2014, 21:31
Location: Argentina
Contact:

Re: UNIR 3 MACROS EN UN SOLO AHK

14 Dec 2015, 08:02

| = desactiva todo
←↓→ = activa el macro 1/2/3

Code: Select all

#NoEnv
SetBatchLines, -1
SetMouseDelay, -1
SetKeyDelay, -1
 
F4::ExitApp
 
~|::
Toggle := !Toggle
try Hotkey, ~LButton, Off
try Hotkey, ~^LButton, Off
try Hotkey, ~*LButton, Off
SoundPlay, % Toggle?"*64":"*84"
return
 
Left:: ;M1
try Hotkey, ~*LButton, Off
Hotkey, ~LButton, M2, Off
Hotkey, ~^LButton, M2, Off
Hotkey, ~LButton, M1, On
Hotkey, ~^LButton, M1, On
return
 
Down:: ;M2
try Hotkey, ~*LButton, Off
Hotkey, ~LButton, M1, Off
Hotkey, ~^LButton, M1, Off
Hotkey, ~LButton, M2, On
Hotkey, ~^LButton, M2, On
return
 
Right:: ;M3
try Hotkey, ~LButton, Off
try Hotkey, ~^LButton, Off
Hotkey, ~*LButton, M3, On
return
 
 ;---------------------------------------------------------------------------------------------------
;MACRO 1
;---------------------------------------------------------------------------------------------------
M1:
ToolTip 1
while GetKeyState("LBUTTON", "P") {
	SendInput, {LBUTTON DOWN}
	Random, rand, 25.48019, 35
	Sleep, %rand%
	SendInput, {LBUTTON UP}
	Sleep, 70
}
return
 
;---------------------------------------------------------------------------------------------------
;MACRO 2
;---------------------------------------------------------------------------------------------------
M2:
ToolTip 2
while GetKeyState("LBUTTON", "P") {
	SendInput, {LBUTTON DOWN}
	Random, rand, 25.48019, 35
	Sleep, %rand%
	SendInput, {LBUTTON UP}
	Sleep, 100.8019
}
return
 
;---------------------------------------------------------------------------------------------------
;MACRO 3
;---------------------------------------------------------------------------------------------------
M3:
ToolTip 3
SendInput, {LButton}
Sleep, 10
SendInput, q
Sleep, 10
SendInput, q
return
nota: para quitar el 1/2 y 3 que aparece, quitar el comando ToolTip.
Se pueden unir tantos macros como quieras, pero se me complica porque no sé en que juego lo usas, como y que teclas hace que... no tengo como testearlo.
Thorx
Posts: 98
Joined: 23 Nov 2015, 18:53

muchas gracias

14 Dec 2015, 09:12

muchas gracias

Return to “Pedir Ayuda”

Who is online

Users browsing this forum: No registered users and 19 guests