2017-03-19 6 views
0

にいくつかのホットキーを組み合わせる:hotstringsについて私が知っているhotstring

; If I press `d` key three times, there should be inserted current date and time 

:*:ddd:: 
FormatTime, CurrentDateTime,, dd.MM.yyyy HH:mm 
SendInput, %CurrentDateTime% 
return 

私がしたいことは、ホットキーのためにそれを複製、すなわちhotstringにいくつかのホットキーを組み合わせることです。

これは、単純なホットキーです:

+Home:: 
SendInput, Foo 
return 

そして、これは私が達成しようとしているものです:

; Press `Shift-Home` twice to send `Bar` 

:*:+Home+Home:: 
SendInput, Bar 
return 

答えて

1

SetTimer-Example #3 を参照するか、この使用:

+Home:: 
count++ ; for each press, increment a counter 
If (count=1) 
    SetTimer send_text, -500 
return 

send_text: 
KeyWait, Shift, L 
If (count=1) 
    SendInput, one 
If (count=2) 
    SendInput, two 
If (count=3) 
    SendInput, three 
; ... 
count:=0  ; reset counter 
return 
関連する問題