vk teclas

Tire suas dúvidas sobre programação em AutoHotkey

Moderator: Gio

Felix Siano
Posts: 90
Joined: 23 Apr 2023, 13:03

vk teclas

Post by Felix Siano » 24 Apr 2023, 22:24

Olá, Como posso usar o vk das teclas para abrir uma pasta
Tipo>

Code: Select all

vk90::
run, "caminho da pasta"
return
Funciona dessa forma?

E para texto

Code: Select all

::vk31::OLa como vai
É assim que usa o vk das teclas?
garry
Posts: 3795
Joined: 22 Dec 2013, 12:50

Re: vk teclas

Post by garry » 30 Apr 2023, 15:47

exemplo
EDIT: modified 20230502

Code: Select all

;-- use NumlockOFF = Numpad-> LEFT/RIGHT/UP/DOWN to start 4 programs
#Requires AutoHotkey v1.1.33
#persistent
SetBatchLines, -1
SetKeyDelay, 80, 10
SetNumLockState, AlwaysOff         ;-- NumLock OFF
Loop, 255
  Hotkey, % "~" Format("vk{:x}",A_Index),aas, On
OnMessage(WM_KEYDOWN     := 0x100, "aas")
return
;--------------
aas:
aa:=GetKeyVK(SubStr(A_ThisHotkey,2)),ab:=Format("vk{:x}",aa),ac:=GetKeyName(ab)
if (ab="vk90" or ab="vk25" or ab="vk27" or ab="vk26" or ab="vk28")
  {
  if (ac="NumpadLeft")
    try run,notepad
  if (ac="NumpadRight")
    try run,rstrui        ;- OPENS system-recovery MENU
  if (ac="NumpadUp")
    try run,calc
  if (ac="NumpadDown")
    try run,charmap
  }
ac:="",ab:=""
return
;--------------
esc::exitapp
;e::exitapp
;================================================

garry
Posts: 3795
Joined: 22 Dec 2013, 12:50

Re: vk teclas

Post by garry » 07 May 2023, 12:51

VK_KEY_CODE List

Code: Select all

#Requires AutoHotkey v1.1.33
#NoEnv
SetBatchLines, -1
Gui, Margin, 20, 20
Gui,Font,s16 cBlack,Lucida Console
color1=D4D0C8 
Gui, Add, Text, , Key History:
Gui, Add, ListView, xm y+2 w480 r35 Grid background%color1%, Key|VK|Nr
LV_ModifyCol(1,250),LV_ModifyCol(2,100),LV_ModifyCol(3,100)
Gui, Show,x400 y10  ,VK_KEY_NAME
gosub,a1
LV_ModifyCol(1, "Logical SortAsc")
return
;---------
GuiClose:
ExitApp
;---------
A1:
i=0
Loop,255
 {
 i++
 ab:=Format("vk{:x}",i), ac:=GetKeyName(ab), KEYX:="{" . ab . "}"
 i :=Format("{:03}", i)
 if ac<>
   Row := LV_Add("",ac,ab,i)
 }
;LV_Modify(Row, "Vis")
return
;=====================================================
Post Reply

Return to “Ajuda e Suporte Geral”