DEMO!!
Přikládám demo kde je to jasně pochopitelné. Ještě je důležité, aby scripty fungovaly, je třeba mít ve složce s projektem knihovnu input.dll (je zabalená v demu => znova nepostuju)
Do příkazu můžete zadat tyto klávesy (Zajímá vás to velkými písmeny, to dáváte do toho příkazu za Keys:: napřiklad Input.trigger?(Keys::ADD) pro zjištění stisknutí klávesy numerického pluska).
- Kód: Vybrat vše
MOUSE_LEFT = 1 # Mouse primary button (Normaly the left button)
MOUSE_RIGHT = 2 # Mouse secondary button (Normaly the right button)
MOUSE_MIDDLE = 4 # Mouse middle button
MOUSE_4TH = 5 # Mouse fourth button
MOUSE_5TH = 6 # Mouse fifth button
#---------------------------------------------------------------------------
# * Miscellaneous Keys
#---------------------------------------------------------------------------
CANCEL = 3 # Cancel key
BACKSPACE = 8 # Backspace key
TAB = 9 # Tab key
CLEAR = 12 # Clear key
RETURN = 13 # Enter key
SHIFT = 16 # Shift key
CTRL = 17 # Control key
ALT = 18 # Alt key
PAUSE = 19 # Pause key
ESCAPE = 27 # Escape key
SPACE = 32 # Space bar key
PGUP = 33 # Page Up key
PGDN = 34 # Page Down key
ENDS = 35 # End key
HOME = 36 # Home key
LEFT = 37 # Left Arrow key
UP = 38 # Up Arrow key
RIGHT = 39 # Right Arrow key
DOWN = 40 # Down Arrow key
SNAPSHOT = 44 # Print Screen key
SELECT = 41 # Select key
PRINT = 42 # Print key
EXECUTE = 43 # Execute key
INSERT = 45 # Insert key
DELETE = 46 # Delete key
HELP = 47 # Help key
LEFT_SHIFT = 160 # Left Shift key
RIGHT_SHIFT = 161 # Right Shift key
LEFT_CONTROL = 162 # Left Control key
RIGHT_CONTROL = 163 # Right Control key
LEFT_ALT = 164 # Left Alt key
RIGHT_ALT = 165 # Right Alt key
#---------------------------------------------------------------------------
# * Number Keys
#---------------------------------------------------------------------------
N0 = 48 # 0 key
N1 = 49 # 1 key
N2 = 50 # 2 key
N3 = 51 # 3 key
N4 = 52 # 4 key
N5 = 53 # 5 key
N6 = 54 # 6 key
N7 = 55 # 7 key
N8 = 56 # 8 key
N9 = 57 # 9 key
#---------------------------------------------------------------------------
# * Letters Keys
#---------------------------------------------------------------------------
A = 65 # A key
B = 66 # B key
C = 67 # C key
D = 68 # D key
E = 69 # E key
F = 70 # F key
G = 71 # G key
H = 72 # H key
I = 73 # I key
J = 74 # J key
K = 75 # K key
L = 76 # L key
M = 77 # M key
N = 78 # N key
O = 79 # O key
P = 80 # P key
Q = 81 # Q key
R = 82 # R key
S = 83 # S key
T = 84 # T key
U = 85 # U key
V = 86 # V key
W = 87 # W key
X = 88 # X key
Y = 89 # Y key
Z = 90 # Z key
#---------------------------------------------------------------------------
# * Windows Keys
#---------------------------------------------------------------------------
LWIN = 91 # Left Windows key (Microsoft Natural keyboard)
RWIN = 92 # Right Windows key (Natural keyboard)
APPS = 93 # Applications key (Natural keyboard)
SLEEP = 95 # Computer Sleep key
BROWSER_BAK = 166 # Browser Back key
BROWSER_FORWARD = 167 # Browser Forward key
BROWSER_REFRESH = 168 # Browser Refresh key
BROWSER_STOP = 169 # Browser Stop key
BROWSER_SEARCH = 170 # Browser Search key
BROWSER_FAVORITES = 171 # Browser Favorites key
BROWSER_HOME = 172 # Browser Start and Home key
VOLUME_MUTE = 173 # Volume Mute key
VOLUME_DOWN = 174 # Volume Down key
VOLUME_UP = 175 # Volume Up key
MEDIA_NEXT_TRACK = 176 # Next Track key
MEDIA_PREV_TRACK = 177 # Previous Track key
MEDIA_STOP = 178 # Stop Media key
MEDIA_PLAY_PAUSE = 179 # Play/Pause Media key
LAUNCH_MAIL = 180 # Start Mail key
LAUNCH_MEDIA_SELECT = 181 # Select Media key
LAUNCH_APP1 = 182 # Start Application 1 key
LAUNCH_APP2 = 183 # Start Application 2 key
PROCESS = 229 # Proccess key
ATTN = 246 # Attn key
CRSEL = 247 # CrSel key
EXSEL = 248 # ExSel key
EREOF = 249 # Erase EOF key
PLAY = 250 # Play key
ZOOM = 251 # Zoom key
PA1 = 253 # PA1 key
#---------------------------------------------------------------------------
# * Pad Keys
#---------------------------------------------------------------------------
NUMPAD0 = 96 # 0 key
NUMPAD1 = 97 # 1 key
NUMPAD2 = 98 # 2 key
NUMPAD3 = 99 # 3 key
NUMPAD4 = 100 # 4 key
NUMPAD5 = 101 # 5 key
NUMPAD6 = 102 # 6 key
NUMPAD7 = 103 # 7 key
NUMPAD8 = 104 # 8 key
NUMPAD9 = 105 # 9 key
MULTIPLY = 106 # Multiply key (*)
ADD = 107 # Add key (+)
SEPARATOR = 108 # Separator key
SUBTRACT = 109 # Subtract key (-)
DECIMAL = 110 # Decimal key (.)
DIVIDE = 111 # Divide key (/)
#---------------------------------------------------------------------------
# * F Keys
#---------------------------------------------------------------------------
F1 = 112 # F1 key
F2 = 113 # F2 key
F3 = 114 # F3 key
F4 = 115 # F4 key
F5 = 116 # F5 key
F6 = 117 # F6 key
F7 = 118 # F7 key
F8 = 119 # F8 key
F9 = 120 # F9 key
F10 = 121 # F10 key
F11 = 122 # F11 key
F12 = 123 # F12 key
F13 = 124 # F13 key
F14 = 125 # F14 key
F15 = 126 # F15 key
F16 = 127 # F16 key
F17 = 128 # F17 key
F18 = 129 # F18 key
F19 = 130 # F19 key
F20 = 131 # F20 key
F21 = 132 # F21 key
F22 = 133 # F22 key
F23 = 134 # F23 key
F24 = 135 # F24 key
#---------------------------------------------------------------------------
# * Mode Keys
#---------------------------------------------------------------------------
CAPS_LOCK = 20 # Caps lock key
NUM_LOCK = 144 # Num lock key
SCROLL_LOCK = 145 # Scroll lock key
KANA = 21 # Kana key
JUNJA = 23 # Junja key
FINAL = 24 # Final key
KANJI = 25 # Kanji key
CONVERT = 28 # Convert key
NONCONVERT = 29 # Non convert key
ACCEPT = 30 # Accept key
MODECHANGE = 31 # Mode change request key
#---------------------------------------------------------------------------
# * OEM Keys
# - Keys used for miscellaneous characters; they can vary by keyboard.
#---------------------------------------------------------------------------
OEM_1 = 186 # In USA 101/102 keyboards (; :)
OEM_2 = 187 # In USA 101/102 keyboards (= +)
OEM_3 = 188 # In USA 101/102 keyboards (, <)
OEM_4 = 189 # In USA 101/102 keyboards (- _)
OEM_5 = 190 # In USA 101/102 keyboards (. >)
OEM_6 = 191 # In USA 101/102 keyboards (/ ?)
OEM_7 = 192 # In USA 101/102 keyboards (` ~)
OEM_8 = 219 # In USA 101/102 keyboards ([ {)
OEM_9 = 220 # In USA 101/102 keyboards (\ |)
OEM_10 = 221 # In USA 101/102 keyboards (] })
OEM_11 = 222 # In USA 101/102 keyboards (' ")
OEM_13 = 223 # OEM key
OEM_14 = 226 # OEM key
OEM_15 = 146 # OEM key
OEM_16 = 147 # OEM key
OEM_17 = 148 # OEM key
OEM_18 = 149 # OEM key
OEM_19 = 150 # OEM key
OEM_20 = 225 # OEM key
OEM_21 = 227 # OEM key
OEM_22 = 228 # OEM key
OEM_23 = 230 # OEM key
OEM_24 = 232 # OEM key
OEM_25 = 240 # OEM key
OEM_26 = 241 # OEM key
OEM_27 = 242 # OEM key
OEM_28 = 243 # OEM key
OEM_29 = 244 # OEM key
OEM_30 = 245 # OEM key
OEM_CLEAR = 254 # OEM Clear key
Poznámka: Pro testování ve scriptech je třeba dát před Input.trigger?(Keys::ADD) klíčovou strukturu IF END nebo IF ELSE END nebo IF ELSIF END