right mouse conditional exit or return function within a script
Posted: 24 Feb 2018, 04:06
Hi guys, I am in need of help to source code to fit into my AHK script, I have tried and mucked about for hours but am not quite getting the right command,
nor do i posess the knowledge at this point.
What I am trying to achieve is to insert a return/exit command right after my sleep 100 line, that executes the following: After 1 right click (normal not hold)
the right mouse click operates normally but also sends a kill(return or exit) command to the script so it gos back to the start. However if I press and hold the right mouse button in/down
I want the script to execute the remainder of the code till its done. Heres what I have, I assume this will have to be achieved with some sort of conditional/ if statement but I cant seem to crack it.
thats in advance for any assistance.![Smile :)](./images/smilies/icon_e_smile.gif)
~RButton:: ;"~": When the hotkey fires, its key's native function will not be blocked
sleep 100
while GetKeyState("RButton","P")
{
Send, {\ Down}
Send, [
Sleep 50
}
SEND, {\ Down}{\ Up}{\ Down}{\ Up}
return
nor do i posess the knowledge at this point.
What I am trying to achieve is to insert a return/exit command right after my sleep 100 line, that executes the following: After 1 right click (normal not hold)
the right mouse click operates normally but also sends a kill(return or exit) command to the script so it gos back to the start. However if I press and hold the right mouse button in/down
I want the script to execute the remainder of the code till its done. Heres what I have, I assume this will have to be achieved with some sort of conditional/ if statement but I cant seem to crack it.
thats in advance for any assistance.
![Smile :)](./images/smilies/icon_e_smile.gif)
~RButton:: ;"~": When the hotkey fires, its key's native function will not be blocked
sleep 100
while GetKeyState("RButton","P")
{
Send, {\ Down}
Send, [
Sleep 50
}
SEND, {\ Down}{\ Up}{\ Down}{\ Up}
return