[已解決] BUG,組合鍵Ctrl+click無法被釋放

遇到了问题?请先进行搜索(中文和英文),然后在此提问
mickeyopq
Posts: 2
Joined: 23 Aug 2014, 09:47

[已解決] BUG,組合鍵Ctrl+click無法被釋放

27 Sep 2014, 09:28

Code: Select all

btn(k)       ;function
{
send {%k% down}
sleep 70
send {%k% up}
sleep 70
}
return

~f12::
loop,{

    if( GetKeyState("f12" , "P") )
    {Send, {LCtrl Down}
    btn("Click")
    }
    else if ( GetKeyState("f12" , "U") ){
    send {LCtrl up}
    }
}
return
腳本目的是為了,按著F12時,Ctrl會壓著,滑鼠左鍵會連點;
但我寫的腳本有個bug:壓了大約2~3秒,LCtrl會一直變壓著(keystate("LCtrl","D")),無法釋放,就算我在設一個快鍵send {LCtrl up},也無效。
只有我去按一下LCtrl的實體按鍵一下才會解除。
Last edited by mickeyopq on 08 Oct 2014, 13:28, edited 1 time in total.
User avatar
RobertL
Posts: 540
Joined: 18 Jan 2014, 01:14
Location: China

Re: BUG,組合鍵Ctrl+click無法被釋放

27 Sep 2014, 10:23

不確定問題,先試試如下..

Code: Select all

~f12::
loop,{
	if( GetKeyState("f12" , "P") ){
		Send, {LCtrl Down}
		btn("Click")
	}
	else{
		send {LCtrl up}
	}
}
我为人人,人人为己?
mickeyopq
Posts: 2
Joined: 23 Aug 2014, 09:47

Re: BUG,組合鍵Ctrl+click無法被釋放

29 Sep 2014, 23:46

:D ,可以了,感恩。

Code: Select all

btn(k)       ;function
{
send {%k% down}
sleep 10
send {%k% up}
sleep 10
}
return

~f12::
Send, {LCtrl Down}
loop,{
    if( GetKeyState("f12" , "P") )
    {
    btn("Click")
    }
    else{
    send {LCtrl up}
    Break
    }
}
return
User avatar
RobertL
Posts: 540
Joined: 18 Jan 2014, 01:14
Location: China

Re: BUG,組合鍵Ctrl+click無法被釋放

03 Oct 2014, 10:11

另外,标题可以改改,不算Bug,外加[已解決]之類的,不然其他人點擊來發現已經完結了。
我为人人,人人为己?

Return to “请求帮助”

Who is online

Users browsing this forum: No registered users and 2 guests