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

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: [已解決] BUG,組合鍵Ctrl+click無法被釋放

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

Post by RobertL » 03 Oct 2014, 10:11

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

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

Post by mickeyopq » 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

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

Post by RobertL » 27 Sep 2014, 10:23

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

Code: Select all

~f12::
loop,{
	if( GetKeyState("f12" , "P") ){
		Send, {LCtrl Down}
		btn("Click")
	}
	else{
		send {LCtrl up}
	}
}

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

Post by mickeyopq » 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的實體按鍵一下才會解除。

Top