что делать если ахк работает неправильно
Что делать если ахк работает неправильно
200?’200px’:»+(this.scrollHeight+5)+’px’);»> #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Menu, Tray, Icon, Shell32.dll, 45
; клавиши дополнительной клавиатуры и Pause, sc которых ф-ция MapVirtualKey не определяет
ScVk := «45,13|11D,A3|135,6F|136,A1|137,2C|138,A5|145,90|147,24|148,26|149,21|»
. «14B,25|14D,27|14F,23|150,28|151,22|152,2D|153,2E|15B,5B|15C,5C|15D,5D»
; клавиши мыши и их vk, а также Ctrl+Break и Clear
KeysVK := «LButton,1|RButton,2|Ctrl+Break,3|MButton,4|XButton1,5|XButton2,6|»
. «Clear,c|Shift,10|Ctrl,11|Alt,12»
Height := 165 ; высота клиентской области, не включая заголовки вкладок
Gui, Font, q5 s12, Verdana
Gui, Add, Text, vAction x15 yp+7 w170 Center c0033BB, Нажмите клавишу
Gui, Add, Text, vKey xp yp+35 wp Center Hidden
Gui, Font, q5 c333333
Gui, Add, Text, vTextVK xp+8 yp+37 Hidden, vk =
Gui, Add, Text, vVK xp+35 yp w62 h23 Center Hidden
Gui, Add, Text, vTextSC xp-35 yp+35 Hidden, sc =
Gui, Add, Text, vSC xp+35 yp w62 h23 Center Hidden
Gui, Font, s8
Gui, Add, Button, vCopyVK gCopy xp+70 yp-35 w50 h22 Hidden, Copy
Gui, Add, Button, vCopySC gCopy xp yp+33 wp hp Hidden, Copy
Gui, Font, q5 s11
Gui, Add, Text, xp yp+58, vk
Gui, Add, Edit, vEditVK gGetKey xp+25 yp-2 w45 h23 Limit3 Uppercase Center
Gui, Add, Text, vKeyVK xp+45 yp+2 w105 Center
hHookKeybd := SetWindowsHookEx()
OnExit, Exit
OnMessage(0x6, «WM_ACTIVATE»)
OnMessage(0x102, «WM_CHAR»)
Return
Exit:
if hHookKeybd
DllCall(«UnhookWindowsHookEx», UInt, hHookKeybd)
ExitApp
SetWindowsHookEx()
<
Return DllCall(«SetWindowsHookEx»
, Int, WH_KEYBOARD_LL := 13
, UInt, RegisterCallback(«LowLevelKeyboardProc», «Fast»)
, UInt, DllCall(«GetModuleHandle», UInt, 0)
, UInt, 0)
>
LowLevelKeyboardProc(nCode, wParam, lParam)
<
static once, WM_KEYDOWN = 0x100, WM_SYSKEYDOWN = 0x104
Critical
SetFormat, IntegerFast, H
vk := NumGet(lParam+0)
Extended := NumGet(lParam+0, 8) & 1
sc := (Extended 3: предполагается hIcon.
TTS_NOPREFIX := 2, TTS_ALWAYSTIP := 1, TTS_BALLOON := 0x40, TTS_CLOSE := 0x80
hWnd := DllCall(«CreateWindowEx», UInt, WS_EX_TOPMOST := 8
, Str, «tooltips_class32», Str, «»
, UInt, TTS_NOPREFIX|TTS_ALWAYSTIP|TTS_BALLOON|TTS_CLOSE
, Int, 0, Int, 0, Int, 0, Int, 0
, UInt, 0, UInt, 0, UInt, 0, UInt, 0)
VarSetCapacity(TOOLINFO, 40)
NumPut(40, TOOLINFO)
NumPut(0x20, TOOLINFO, 4) ; TTF_TRACK = 0x20
NumPut(&sText, TOOLINFO, 36)
A_DHW := A_DetectHiddenWindows
DetectHiddenWindows, On
WinWait, ahk_id %hWnd%
SendMessage, 1048,, 500 ; TTM_SETMAXTIPWIDTH
SendMessage, 1028,, &TOOLINFO ; TTM_ADDTOOL
SendMessage, 1042,, x|(y