-
Notifications
You must be signed in to change notification settings - Fork 1
/
OmniFocusAddInboxTask.applescript
45 lines (41 loc) · 1.47 KB
/
OmniFocusAddInboxTask.applescript
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
set currentApplication to current application
tell application "OmniFocus"
activate
tell quick entry
open
set _task to make new inbox task with properties {name:"{popclip text}"}
tell the note of _task
if "{popclip text}" contains "http://" or "{popclip text}" contains "https://" then
insert "{popclip text}" & return & return at before first character
end if
insert "From application: " & name of currentApplication & " on " & current date as string & return & return at before first character
end tell
end tell
tell application "System Events"
keystroke (ASCII character 31)
keystroke "'" using command down
end tell
end tell
(*
on run {aSelectedText, parameters}
tell application "OmniFocus"
activate
tell quick entry
open
set _task to make new inbox task with properties {name:aSelectedText}
(*
tell the note of _task
insert "Original Message" & return & return & aSelectedText at before first character
set value of attribute "link" of style of paragraph 1 to "aMsgUrl"
insert "From: " & "aSender" & " " at before first character
end tell
*)
select {_task}
tell application "System Events"
keystroke "'" using command down
end tell
end tell
end tell
return aSelectedText
end run
*)