-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist_writing_tools.applescript
33 lines (29 loc) · 1.19 KB
/
list_writing_tools.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
on run
-- Define the writing tools with their exact menu paths
set writingTools to {¬
{name:"Compose...", id:"compose"}, ¬
{name:"Proofread", id:"proofread"}, ¬
{name:"Rewrite", id:"rewrite"}, ¬
{name:"Make Friendly", id:"make_friendly"}, ¬
{name:"Make Professional", id:"make_professional"}, ¬
{name:"Make Concise", id:"make_concise"}, ¬
{name:"Summarize", id:"summarize"}, ¬
{name:"Create Key Points", id:"create_key_points"}, ¬
{name:"Make List", id:"make_list"}, ¬
{name:"Make Table", id:"make_table"} ¬
}
-- Create JSON for Alfred script filter
set json to "{"
set json to json & "\"items\": ["
repeat with tool in writingTools
set json to json & "{"
set json to json & "\"uid\": \"" & (id of tool) & "\","
set json to json & "\"title\": \"" & (name of tool) & "\","
set json to json & "\"arg\": \"" & (name of tool) & "\","
set json to json & "\"subtitle\": \"Apply " & (name of tool) & " to selected text\""
set json to json & "},"
end repeat
set json to text 1 thru -2 of json
set json to json & "]}"
return json
end run