Last active
October 23, 2018 08:43
-
-
Save icon-tech-mb/c5fccca213f02313717693ca7e8ed33c to your computer and use it in GitHub Desktop.
AutoHotkey shortcuts for LabVIEW
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv | |
; This setting can miss clicks when running LabVIEW in a VM. Comment it out if this is an issue. | |
SendMode Input | |
SetTitleMatchMode, 2 | |
; Apply shortcuts to any LabVIEW window | |
#IfWinActive ahk_class LVDChild | |
; Middle mouse modifiers | |
; Use middle mouse rather than ctrl+shift+mouse to activate the grab/pan tool | |
MButton::send {ctrl down}{shift down}{MButton down}{shift up}{ctrl up} | |
MButton up::send {MButton up} | |
; Mouse wheel modifiers | |
; Shift+Scrollwheel : horizontal scrolling | |
+WheelDown::send {WheelRight} | |
+WheelUp::send {WheelLeft} | |
; Shoutout to ikaiser on the Idea Exchange for the faster scrolling variants | |
; Alt+Scrollwheel: faster vertical scrolling | |
!WheelDown::Send +{WheelDown} | |
!WheelUp::Send +{WheelUp} | |
; Shift+Alt+Scrollwheel : faster horizontal scrolling | |
+!WheelDown::Send +{WheelRight} | |
+!WheelUp::Send +{WheelLeft} | |
#IfWinActive | |
; Apply shortcuts to block diagram window only | |
#IfWinActive Block Diagram ahk_class LVDChild | |
;;;;;; THIS IS DISABLED FOR NOW, IT'S TOO BUGGY TO BE USEFUL ;;;;;; | |
; Automatically press 'w' when clicking and dragging to disable 'maintain connected wires' logic | |
; You can press 'w' again to re-enable the connected wire logic while performing the click+drag | |
; More info: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Opt-out-permanently-from-quot-maintain-wires-connected-quot/idi-p/3672954 | |
;LButton:: | |
; send {LButton down} | |
; w_pressed := 0 | |
; MouseGetPos, xpos_start, ypos_start | |
; Loop | |
; { | |
; if (GetKeyState("LButton", "P")) | |
; { | |
; MouseGetPos, xpos_current, ypos_current | |
; | |
; ; The mouse needs to move at least 10 pixels to consider it a click+drag | |
; if (abs(xpos_current - xpos_start) > 10 or abs(ypos_current - ypos_start) > 10) | |
; { | |
; if (w_pressed = 0) | |
; { | |
; send w | |
; w_pressed := 1 | |
; } | |
; } | |
; } | |
; else | |
; { | |
; break | |
; } | |
; sleep, 10 | |
; } | |
; send {LButton up} | |
; return | |
#IfWinActive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment