Thanks od1n, so I have added the usehook command and it works sporadically. How do I make this code "smooth"? and how do I take account of the update rate of xim and sandhawC?
Do you have some sample code that demonstrates the above that you could share?
#NoEnv
#Usehook
SendMode Input
SetWorkingDir %A_ScriptDir%
GetKeyState, state, Delete
if state = D
{
XIM:=false
}
GetKeyState, state, Insert
if state = D
{
XIM:=true
}
; XIM1
XIM4 := 1
; XIM
~LButton::
while GetKeyState("LButton") & XIM4
{
DllCall("mouse_event", uint, 1, int, 0, int, 3, uint, 0, int, 0)
Sleep, 30
DllCall("mouse_event", uint, 1, int, 0, int, 4, uint, 0, int, 0)
Sleep, 5
}
return