English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

如題,誰知道這要怎麼弄???
讓VB自動定時按出鍵盤的某個按鍵?

2006-07-27 08:15:33 · 2 個解答 · 發問者 想妤 1 in 電腦與網際網路 軟體

2 個解答

使用原件 Timer 設定時間,然後在程式碼寫入:

Private Sub Timer1_Timer()
'Sendkeys 就是模擬使用者按按鍵,CHR(65)就是A,可查 ASCII 表
SendKeys Chr(65)
End Sub

2006-07-30 21:25:33 補充:
如要按特殊按鍵,請參考列表:按鍵 特殊鍵的表示法BACKSPACE {BACKSPACE}BREAK {BREAK}CAPS LOCK {CAPSLOCK}DEL 或 DELETE {DELETE} 或 {DEL}DOWN ARROW {DOWN}END {END}ENTER {ENTER}ESC {ESC}HELP {HELP}HOME {HOME}INS 或 INSERT {INSERT} 或 {INS}LEFT ARROW {LEFT}NUM LOCK {NUMLOCK}

2006-07-30 21:26:06 補充:
PAGE DOWN {PGDN}PAGE UP {PGUP}PRINT SCREEN {PRTSC}RIGHT ARROW {RIGHT}SCROLL LOCK {SCROLLLOCK}TAB {TAB}UP ARROW {UP}F1 {F1}F2 {F2}F3 {F3}F4 {F4}F5 {F5}F6 {F6}F7 {F7}F8 {F8}F9 {F9}F10 {F10}F11 {F11}F12 {F12}F13 {F13}F14 {F14}F15 {F15}F16 {F16}

2006-07-28 12:45:36 · answer #1 · answered by 藍冰小舖 5 · 0 0

dim i as long
Private Sub Timer1_Timer()
i=i+1
SendKeys Chr(i)
End Sub

2006-07-29 04:30:42 · answer #2 · answered by 4 · 0 0

fedest.com, questions and answers