AHK заменяет Alt + Shift + LMB на Alt + Shift + Ctrl + LMB?

286
OpenglNoob

Я новичок в AHK, но я мог бы написать несколько сценариев к одному. Это: `

!+LButton:: SendInput  Loop { Sleep, 10 GetKeyState, state, LButton, P if state = U  break  } SendInput  return 

Я не знаю почему, но когда я отлаживал этот скрипт на MacrorRecorder или другом, он писал:

Keyboard : ShiftLeft : KeyDown Keyboard : AltLeft : KeyDown Mouse : 193 : 306 : LeftButtonDown : 0 : 0 : 0 Keyboard : ControlLeft : KeyDown Keyboard : ControlLeft : KeyUp Keyboard : ControlLeft : KeyDown Keyboard : ControlLeft : KeyUp Keyboard : AltLeft : KeyUp Keyboard : ShiftLeft : KeyUp Mouse : 193 : 306 : MiddleButtonDown : 0 : 0 : 0 Mouse : 193 : 306 : RightButtonDown : 0 : 0 : 0 Keyboard : ControlLeft : KeyDown Keyboard : AltLeft : KeyDown Keyboard : ControlLeft : KeyUp Keyboard : ShiftLeft : KeyDown Keyboard : ControlLeft : KeyDown Keyboard : ControlLeft : KeyUp Keyboard : AltLeft : KeyUp Keyboard : ShiftLeft : KeyUp Mouse : 236 : 336 : MiddleButtonUp : 0 : 0 : 0 Mouse : 236 : 336 : RightButtonUp : 0 : 0 : 0 Keyboard : AltLeft : KeyDown Keyboard : AltLeft : KeyDown DELAY : 38 Keyboard : AltLeft : KeyUp Keyboard : ShiftLeft : KeyUp 

Откуда появился CTRL ???? Где ошибка? Спасибо!

0

1 ответ на вопрос

0
JJohnston2

Control gets toggled before the mouse buttons are 'clicked', but AutoHotkey is not replacing the key combination as implied in the title of this post. I see nothing wrong with the keystrokes recorded because the Control key is never down for any action, it's just toggled down and then up again immediately. If you look at the script keystrokes in AutoHotkey instead of MacroRecorder you will see that the keystrokes generated after the hotkey trigger are ignored by AutoHotkey because they are generated internally. Are you experiencing some other issue as a result of the control key being toggled in the middle of the script execution?

Fyi, you can also use an Up hotkey as shown below...

!+LButton:: SendInput return !+LButton Up:: SendInput return 
Также интересно, связан ли дополнительный элемент управления с `# MenuMaskKey` и повлияет ли это на вас? JJohnston2 8 лет назад 0