求助:每隔三秒重新设置重映射如何实现?

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: 求助:每隔三秒重新设置重映射如何实现?

求助:每隔三秒重新设置重映射如何实现?

Post by carloskaine » 07 Jun 2018, 01:28

各位大神,我想实现这么一个功能:
从按下space起,每隔三秒,将space轮流重映射为3和4
只要space按下,每隔三秒,发送一次shift+click
请问怎么实现啊

这是我的代码,似乎有无数问题
$space:: {
If v_Enable
func(3)
else
func(4)
}
return

func(key) {
space::key
v_Enable:=!v_Enable
if getkeystate("space", "p") {
send, {shift down}
click
send, {shift up}
}
sleep 3000
return
}

Top