-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenDMS.ahk
51 lines (41 loc) · 959 Bytes
/
OpenDMS.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
; Activated by Win+o
#o::
; Get the input, exit if user cancels
InputBox, IRN, Open DMS, Enter IRN,,,,,,,,%IRN%
if ErrorLevel
return
SetTitleMatchMode, RegEx
; Get the Outlook window
WinExist(" - Microsoft Outlook")
WinActivate
WinMaximize
; Click the "Search for Workspace" button
; Click 808, 68, 2
; Use the Alt+4 quick access toolbar "Search for workspace" shortcut
Send !4
; Wait for the Search workspaces window, and exit if it doesn't arrive
WinWaitActive, Search Workspaces,,2
if ErrorLevel
return
; Click in the IRN field, select all text and enter the IRN
;Click 386, 453
; Use tabs to get to the IRN field
Sleep 50
Send {Tab}
Sleep 50
Send {Tab}
Sleep 50
Send {Tab}
Sleep 50
Send ^a
Send %IRN%{Enter}
; Wait for the Search Results window and exit if it doesn't arrive
WinWaitActive Search Results,,2
if ErrorLevel
return
Send {Down}{Enter}
Sleep 400
; Navigate to the Correspondence folder
Send +{Tab}
Send {Right}{Down}{Enter}
return