congdantoancau

Make F3 to copy key

Dec 12th, 2017
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;https://autohotkey.com/boards/viewtopic.php?f=5&t=33395&p=154913#p154913
  2.  
  3. $F3::
  4. KeyWait, F3 ; wait for F3 released
  5. KeyWait, F3, D T0.2 ; wait 1 second for F3 pressed again
  6. If ErrorLevel ; if 1 second passes before F3 is pressed again
  7. {
  8.     Send ^c ; or whatever your copy code is
  9. }
  10. else ; we will now allow F3 to be pressed normally
  11. {
  12.     Loop
  13.     {
  14.         Send {F3 down}
  15.         KeyWait, F3 ; wait for F3 release
  16.         Send {F3 up}
  17.         KeyWait, F3, D T1 ; wait 1 second for F3 pressed again
  18.         If ErrorLevel ; if 1 second passes before F3 is pressed again
  19.            Break ; exit his Loop
  20.     }
  21. }
  22. return
Advertisement
Add Comment
Please, Sign In to add comment