This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outlook_to_moodo.ahk
58 lines (46 loc) · 1.96 KB
/
outlook_to_moodo.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
53
54
55
56
57
58
; ======================================= Outlook to Moo.do ======================================
; There is no integration between these two applications
; The goal is to automate the input of Outlook emails to actions in Moo.do
; Outlook does not support linking in, so Email Subject will be used as reference
;
; ---------------------------------------------------------------------------------------- AHK ENV
#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.
#NoTrayIcon
; --------------------------------------------------------------------------------------- TRIGGERS
#IfWinActive, ahk_exe OUTLOOK.EXE ;Run only in Outlook
^!1::
; Copy email info
Clipboard =
SendInput, ^c
ClipWait
; Remove common heading titles
result := Clipboard
result := RegExReplace(result, "Subject\t")
result := RegExReplace(result, "From\t")
result := RegExReplace(result, "Received\t")
result := RegExReplace(result, "Categories\t")
; Move columns into new lines
result := RegExReplace(result, "\t", "`r")
; Add result to clipboard
Clipboard =
Clipboard = %result%
ClipWait
; Add to Moo.do
winactivate Moo.do ;Switch to Moo.do window
Send !n ;Add new item
; Select location
Send {tab}
Send Email Inbox ;Select location
Sleep 100 ;Delay for Moo.do reactivity
Send {enter} ;Select location
; Fill notes field with email info
Send {tab}
Send ^v
Sleep 100
; Step back to Task title
Send +{tab}
Send +{tab}
return