-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathide.ahk
52 lines (47 loc) · 991 Bytes
/
ide.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
; ide.ahk
; Description: Main LabVIEW
; Author: Travis Gall
; Block Diagrams {{{1
; Get list of open Block Diagrams for a drop-down list
CurrentBlockDiagrams()
{
WindowList := ""
First := True
WinGet windows, List
Loop %windows%
{
id := windows%A_Index%
WinGetTitle wt, ahk_id %id%
IfInString, wt, Block Diagram
{
WindowList .= (First ? wt "|" : "|" wt)
First := False
}
}
Return WindowList
}
BD_CleanWires()
{
; Prevent shift clicks
MouseGetPos x, y ; Save current mouse position
While GetKeyState("Shift", "P")
{
Sleep, 1
}
MouseMove %x%, %y% ; Prevent small mouse movements
; Right click at current mouse location
Click, Right
Send, c
Send, {Enter}
}
; Center block diagram
BD_Centre()
{
MouseGetPos x, y
; Positions are relative to the active window
centerX := (leftPanelWidth / 2) - leftPanelWidth
centerY := bottomPanelY + (bottomPanelHeight / 2)
MouseMove %centerX%, %centerY%
Click
MouseMove %x%, %y%
}