Hello, i need a script that will make a "zone" in the client of the game ") that will have the effect that when i press left button in that "zone", automatically will press f1 before that click (im not good making ahk codes)
thanks if anyone can help me, i pay if it necesary via Paypal
(the red zone= the zone where if i press left click, it will press f1 before that click)
Help, i pay
Help, i pay
Last edited by Gonzalo94 on 26 Sep 2017, 14:10, edited 4 times in total.
Re: Question
Hi Gonzalo94,
Yes. Here's some commands that seems to relevant in your case:
hotkeys
#IfWinActive
Send
CoordMode
MouseGetPos
If var [not] between LowerBound and UpperBound
Yes. Here's some commands that seems to relevant in your case:
hotkeys
#IfWinActive
Send
CoordMode
MouseGetPos
If var [not] between LowerBound and UpperBound
Re: Question
sended to you a private msgA_AhkUser wrote:Hi Gonzalo94,
Yes. Here's some commands that seems to relevant in your case:
hotkeys
#IfWinActive
Send
CoordMode
MouseGetPos
If var [not] between LowerBound and UpperBound
Re: Question
The game is
this in the client of the game
The red are the coords where i want the effect of the left click (automatically press f1 before the left click)
this in the client of the game
The red are the coords where i want the effect of the left click (automatically press f1 before the left click)
Last edited by Gonzalo94 on 24 Sep 2017, 15:40, edited 1 time in total.
Re: Question
Ok so below a sample script. Basically it will send F1 before clicking if the mouse appears to be in the red area (0,0 - 200,200) - adjust the if betwwen lines parameters to make it fit your purposes (I made the script display the coordinates to help you find them).
Hope it helps.
Code: Select all
CoordMode, Mouse, Window ; sets mouse coordinates to be relative to either the active window
SetTitleMatchMode, 2 ; A window's title can contain WinTitle param anywhere inside it to be a match.
#IfWinActive OS-Scape
$LButton::
MouseGetPos, x, y ; retrieves the current position of the mouse cursor
ToolTip % x . "," . y ; displays these coordinates (for test purpose)
if x between 0 and 200
if y between 0 and 200
{
send, {F1}{LButton}
return
}
; otherwise...
send, {LButton}
return ; end of the hotkey subroutine
Hope it helps.
Re: Question
A_AhkUser wrote:Ok so below a sample script. Basically it will send F1 before clicking if the mouse appears to be in the red area (0,0 - 200,200) - adjust the if betwwen lines parameters to make it fit your purposes (I made the script display the coordinates to help you find them).
Code: Select all
CoordMode, Mouse, Window ; sets mouse coordinates to be relative to either the active window SetTitleMatchMode, 2 ; A window's title can contain WinTitle param anywhere inside it to be a match. #IfWinActive OS-Scape $LButton:: MouseGetPos, x, y ; retrieves the current position of the mouse cursor ToolTip % x . "," . y ; displays these coordinates (for test purpose) if x between 0 and 200 if y between 0 and 200 { send, {F1}{LButton} return } ; otherwise... send, {LButton} return ; end of the hotkey subroutine
Hope it helps.
OMGGGGG THANKS!! ITS WORKS
Re: Question
Thanks for the help of the other day, but i want to change now some things, idk if is posible, instead of having the click effect i want this effect that i have in my another AHKA_AhkUser wrote:Ok so below a sample script. Basically it will send F1 before clicking if the mouse appears to be in the red area (0,0 - 200,200) - adjust the if betwwen lines parameters to make it fit your purposes (I made the script display the coordinates to help you find them).
Code: Select all
CoordMode, Mouse, Window ; sets mouse coordinates to be relative to either the active window SetTitleMatchMode, 2 ; A window's title can contain WinTitle param anywhere inside it to be a match. #IfWinActive OS-Scape $LButton:: MouseGetPos, x, y ; retrieves the current position of the mouse cursor ToolTip % x . "," . y ; displays these coordinates (for test purpose) if x between 0 and 200 if y between 0 and 200 { send, {F1}{LButton} return } ; otherwise... send, {LButton} return ; end of the hotkey subroutine
Hope it helps.
Code: Select all
SetMouseDelay 8
~$LButton::
While GetKeyState("LButton", "P"){
Click
sleep,10
}
return
F10::Suspend, On
F7::Suspend, Off
Regards
Re: Question
Hola Gonzalo,
This should work:
This should work:
Code: Select all
CoordMode, Mouse, Window ; sets mouse coordinates to be relative to either the active window
SetTitleMatchMode, 2 ; A window's title can contain WinTitle param anywhere inside it to be a match.
#IfWinActive OS-Scape
$LButton::
SetMouseDelay 8
MouseGetPos, x, y ; retrieves the current position of the mouse cursor
ToolTip % x . "," . y ; displays these coordinates (for test purpose)
if x between 0 and 200
if y between 0 and 200
{
While (GetKeyState("LButton", "P")) {
click
sleep,10
}
return
}
send, {LButton}
return ; end of the hotkey subroutine
F10::Suspend, On
F7::Suspend, Off
Re: Question
A_AhkUser wrote:Hola Gonzalo,
This should work:
Code: Select all
CoordMode, Mouse, Window ; sets mouse coordinates to be relative to either the active window SetTitleMatchMode, 2 ; A window's title can contain WinTitle param anywhere inside it to be a match. #IfWinActive OS-Scape $LButton:: SetMouseDelay 8 MouseGetPos, x, y ; retrieves the current position of the mouse cursor ToolTip % x . "," . y ; displays these coordinates (for test purpose) if x between 0 and 200 if y between 0 and 200 { While (GetKeyState("LButton", "P")) { click sleep,10 } return } send, {LButton} return ; end of the hotkey subroutine F10::Suspend, On F7::Suspend, Off
YOUR A GOD!!! PERFECT, YOU SOLVE ALL MY PROBLEMS
Who is online
Users browsing this forum: No registered users and 18 guests