├── Finder
├── Automator
│ ├── Mesh Hook.workflow.zip
│ ├── Hook to Clipboard.workflow.zip
│ ├── Mesh Hook.workflow
│ │ └── Contents
│ │ │ ├── QuickLook
│ │ │ └── Thumbnail.png
│ │ │ ├── _CodeSignature
│ │ │ ├── CodeDirectory
│ │ │ ├── CodeSignature
│ │ │ ├── CodeRequirements
│ │ │ ├── CodeRequirements-1
│ │ │ └── CodeResources
│ │ │ ├── Info.plist
│ │ │ └── document.wflow
│ └── Hook to Clipboard.workflow
│ │ └── Contents
│ │ ├── QuickLook
│ │ └── Thumbnail.png
│ │ ├── _CodeSignature
│ │ ├── CodeDirectory
│ │ ├── CodeSignature
│ │ ├── CodeRequirements
│ │ ├── CodeRequirements-1
│ │ └── CodeResources
│ │ ├── Info.plist
│ │ └── document.wflow
└── AppleScript
│ ├── Hook to Clipboard.applescript
│ └── Mesh Hook.applescript
└── README.md
/Finder/Automator/Mesh Hook.workflow.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Mesh Hook.workflow.zip
--------------------------------------------------------------------------------
/Finder/Automator/Hook to Clipboard.workflow.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Hook to Clipboard.workflow.zip
--------------------------------------------------------------------------------
/Finder/Automator/Mesh Hook.workflow/Contents/QuickLook/Thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Mesh Hook.workflow/Contents/QuickLook/Thumbnail.png
--------------------------------------------------------------------------------
/Finder/Automator/Mesh Hook.workflow/Contents/_CodeSignature/CodeDirectory:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Mesh Hook.workflow/Contents/_CodeSignature/CodeDirectory
--------------------------------------------------------------------------------
/Finder/Automator/Mesh Hook.workflow/Contents/_CodeSignature/CodeSignature:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Mesh Hook.workflow/Contents/_CodeSignature/CodeSignature
--------------------------------------------------------------------------------
/Finder/Automator/Hook to Clipboard.workflow/Contents/QuickLook/Thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Hook to Clipboard.workflow/Contents/QuickLook/Thumbnail.png
--------------------------------------------------------------------------------
/Finder/Automator/Mesh Hook.workflow/Contents/_CodeSignature/CodeRequirements:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Mesh Hook.workflow/Contents/_CodeSignature/CodeRequirements
--------------------------------------------------------------------------------
/Finder/Automator/Mesh Hook.workflow/Contents/_CodeSignature/CodeRequirements-1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Mesh Hook.workflow/Contents/_CodeSignature/CodeRequirements-1
--------------------------------------------------------------------------------
/Finder/Automator/Hook to Clipboard.workflow/Contents/_CodeSignature/CodeDirectory:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Hook to Clipboard.workflow/Contents/_CodeSignature/CodeDirectory
--------------------------------------------------------------------------------
/Finder/Automator/Hook to Clipboard.workflow/Contents/_CodeSignature/CodeSignature:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Hook to Clipboard.workflow/Contents/_CodeSignature/CodeSignature
--------------------------------------------------------------------------------
/Finder/Automator/Hook to Clipboard.workflow/Contents/_CodeSignature/CodeRequirements:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Hook to Clipboard.workflow/Contents/_CodeSignature/CodeRequirements
--------------------------------------------------------------------------------
/Finder/Automator/Hook to Clipboard.workflow/Contents/_CodeSignature/CodeRequirements-1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/hook_goodies/master/Finder/Automator/Hook to Clipboard.workflow/Contents/_CodeSignature/CodeRequirements-1
--------------------------------------------------------------------------------
/Finder/AppleScript/Hook to Clipboard.applescript:
--------------------------------------------------------------------------------
1 | use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
set _pb to the clipboard as record
set _url to string of _pb
set _title to Unicode text of _pb
tell application "Hook"
set _hook to make bookmark with data _url
set name of _hook to _title
end tell
tell application "Finder"
set _files to selection
if (count of _files) > 0 then
repeat with _file in _files
tell application "Hook"
2 | set x to (percent encode POSIX path of (_file as string))
3 | set _target to make bookmark with data x
hook _hook and _target
end tell
end repeat
else
display dialog "No files selected"
end if
end tell
--------------------------------------------------------------------------------
/Finder/AppleScript/Mesh Hook.applescript:
--------------------------------------------------------------------------------
1 | use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
tell application "Finder"
set _files to selection
set _targets to _files
if (count of _files) > 1 then
repeat with _file in _files
repeat with _target in _targets
if _file is not equal to _target then
tell application "Hook"
set x to (percent encode POSIX path of (_file as string))
2 | set _src to make bookmark with data x
3 | set y to (percent encode POSIX path of (_target as string))
4 | set _tgt to make bookmark with data y
hook _src and _tgt
end tell
end if
end repeat
end repeat
else
display dialog "2 or more files must be selected"
end if
end tell
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Scripts and Services for Hook (macOS)
2 |
3 | This repository collects scripts and services written for the macOS productivity app, [Hook](https://hookproductivity.com/).
4 |
5 | ## Finder
6 |
7 | This folder contains raw AppleScripts and System Service versions of two scripts:
8 |
9 | **Hook To Clipboard**: Creates a hook link between the selected file and the link in your clipboard. The Service version of this can be triggered as a Finder Extra or via right click menu. The AppleScript version can be used in any kind of automation (Keyboard Maestro, BetterTouchTool, etc.)
10 |
11 | **Mesh Hook**: Creates bi-directional links between two or more selected files. The AppleScript is written to work on a Finder selection, but could easily be modified to accept files from any automation that could pass them.
12 |
--------------------------------------------------------------------------------
/Finder/Automator/Mesh Hook.workflow/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSServices
6 |
7 |
8 | NSBackgroundColorName
9 | background
10 | NSIconName
11 | NSActionTemplate
12 | NSMenuItem
13 |
14 | default
15 | Mesh Hook
16 |
17 | NSMessage
18 | runWorkflowAsService
19 | NSRequiredContext
20 |
21 | NSApplicationIdentifier
22 | com.apple.finder
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Finder/Automator/Hook to Clipboard.workflow/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSServices
6 |
7 |
8 | NSBackgroundColorName
9 | background
10 | NSIconName
11 | NSActionTemplate
12 | NSMenuItem
13 |
14 | default
15 | Hook to Clipboard
16 |
17 | NSMessage
18 | runWorkflowAsService
19 | NSRequiredContext
20 |
21 | NSApplicationIdentifier
22 | com.apple.finder
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Finder/Automator/Mesh Hook.workflow/Contents/_CodeSignature/CodeResources:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | files
6 |
7 | files2
8 |
9 | QuickLook/Thumbnail.png
10 |
11 | hash
12 |
13 | cpVDVfvmkVuzqPIEineKTjslj8Q=
14 |
15 | hash2
16 |
17 | q7HRbxKGkLrVYJRzj8t/FwtnJ9RvEN54MU8NjwN463Q=
18 |
19 |
20 | document.wflow
21 |
22 | cdhash
23 |
24 | MvNJ4eXDp5GXFgyGxeeBZmX2o8c=
25 |
26 | requirement
27 | identifier document and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "47TRS7H4BH"
28 |
29 |
30 | rules
31 |
32 | ^Resources/
33 |
34 | ^Resources/.*\.lproj/
35 |
36 | optional
37 |
38 | weight
39 | 1000
40 |
41 | ^Resources/.*\.lproj/locversion.plist$
42 |
43 | omit
44 |
45 | weight
46 | 1100
47 |
48 | ^Resources/Base\.lproj/
49 |
50 | weight
51 | 1010
52 |
53 | ^version.plist$
54 |
55 |
56 | rules2
57 |
58 | .*\.dSYM($|/)
59 |
60 | weight
61 | 11
62 |
63 | ^(.*/)?\.DS_Store$
64 |
65 | omit
66 |
67 | weight
68 | 2000
69 |
70 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
71 |
72 | nested
73 |
74 | weight
75 | 10
76 |
77 | ^.*
78 |
79 | ^Info\.plist$
80 |
81 | omit
82 |
83 | weight
84 | 20
85 |
86 | ^PkgInfo$
87 |
88 | omit
89 |
90 | weight
91 | 20
92 |
93 | ^Resources/
94 |
95 | weight
96 | 20
97 |
98 | ^Resources/.*\.lproj/
99 |
100 | optional
101 |
102 | weight
103 | 1000
104 |
105 | ^Resources/.*\.lproj/locversion.plist$
106 |
107 | omit
108 |
109 | weight
110 | 1100
111 |
112 | ^Resources/Base\.lproj/
113 |
114 | weight
115 | 1010
116 |
117 | ^[^/]+$
118 |
119 | nested
120 |
121 | weight
122 | 10
123 |
124 | ^embedded\.provisionprofile$
125 |
126 | weight
127 | 20
128 |
129 | ^version\.plist$
130 |
131 | weight
132 | 20
133 |
134 |
135 |
136 |
137 |
--------------------------------------------------------------------------------
/Finder/Automator/Hook to Clipboard.workflow/Contents/_CodeSignature/CodeResources:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | files
6 |
7 | files2
8 |
9 | QuickLook/Thumbnail.png
10 |
11 | hash
12 |
13 | cpVDVfvmkVuzqPIEineKTjslj8Q=
14 |
15 | hash2
16 |
17 | q7HRbxKGkLrVYJRzj8t/FwtnJ9RvEN54MU8NjwN463Q=
18 |
19 |
20 | document.wflow
21 |
22 | cdhash
23 |
24 | eveRr1H+2Hd0W+U5EW0aRAQC9W4=
25 |
26 | requirement
27 | identifier document and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "47TRS7H4BH"
28 |
29 |
30 | rules
31 |
32 | ^Resources/
33 |
34 | ^Resources/.*\.lproj/
35 |
36 | optional
37 |
38 | weight
39 | 1000
40 |
41 | ^Resources/.*\.lproj/locversion.plist$
42 |
43 | omit
44 |
45 | weight
46 | 1100
47 |
48 | ^Resources/Base\.lproj/
49 |
50 | weight
51 | 1010
52 |
53 | ^version.plist$
54 |
55 |
56 | rules2
57 |
58 | .*\.dSYM($|/)
59 |
60 | weight
61 | 11
62 |
63 | ^(.*/)?\.DS_Store$
64 |
65 | omit
66 |
67 | weight
68 | 2000
69 |
70 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
71 |
72 | nested
73 |
74 | weight
75 | 10
76 |
77 | ^.*
78 |
79 | ^Info\.plist$
80 |
81 | omit
82 |
83 | weight
84 | 20
85 |
86 | ^PkgInfo$
87 |
88 | omit
89 |
90 | weight
91 | 20
92 |
93 | ^Resources/
94 |
95 | weight
96 | 20
97 |
98 | ^Resources/.*\.lproj/
99 |
100 | optional
101 |
102 | weight
103 | 1000
104 |
105 | ^Resources/.*\.lproj/locversion.plist$
106 |
107 | omit
108 |
109 | weight
110 | 1100
111 |
112 | ^Resources/Base\.lproj/
113 |
114 | weight
115 | 1010
116 |
117 | ^[^/]+$
118 |
119 | nested
120 |
121 | weight
122 | 10
123 |
124 | ^embedded\.provisionprofile$
125 |
126 | weight
127 | 20
128 |
129 | ^version\.plist$
130 |
131 | weight
132 | 20
133 |
134 |
135 |
136 |
137 |
--------------------------------------------------------------------------------
/Finder/Automator/Hook to Clipboard.workflow/Contents/document.wflow:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | AMApplicationBuild
6 | 512
7 | AMApplicationVersion
8 | 2.10
9 | AMDocumentVersion
10 | 2
11 | actions
12 |
13 |
14 | action
15 |
16 | AMAccepts
17 |
18 | Container
19 | List
20 | Optional
21 |
22 | Types
23 |
24 | com.apple.applescript.object
25 |
26 |
27 | AMActionVersion
28 | 1.0.2
29 | AMApplication
30 |
31 | Automator
32 |
33 | AMParameterProperties
34 |
35 | source
36 |
37 |
38 | AMProvides
39 |
40 | Container
41 | List
42 | Types
43 |
44 | com.apple.applescript.object
45 |
46 |
47 | ActionBundlePath
48 | /System/Library/Automator/Run AppleScript.action
49 | ActionName
50 | Run AppleScript
51 | ActionParameters
52 |
53 | source
54 | on run {input, parameters}
55 | set _pb to the clipboard as record
56 | set _url to string of _pb
57 | set _title to Unicode text of _pb
58 |
59 | tell application "Hook"
60 | set _hook to make bookmark with data _url
61 | set name of _hook to _title
62 | end tell
63 |
64 | tell application "Finder"
65 | set _files to selection
66 | if (count of _files) > 0 then
67 | repeat with _file in _files
68 | tell application "Hook"
69 | set x to (percent encode POSIX path of (_file as string))
70 | set _target to make bookmark with data x
71 |
72 | hook _hook and _target
73 | end tell
74 | end repeat
75 | else
76 | display dialog "No files selected"
77 | end if
78 | end tell
79 |
80 | return input
81 | end run
82 |
83 | BundleIdentifier
84 | com.apple.Automator.RunScript
85 | CFBundleVersion
86 | 1.0.2
87 | CanShowSelectedItemsWhenRun
88 |
89 | CanShowWhenRun
90 |
91 | Category
92 |
93 | AMCategoryUtilities
94 |
95 | Class Name
96 | RunScriptAction
97 | InputUUID
98 | FECBD813-5D3E-40C9-947F-54FB10C4313B
99 | Keywords
100 |
101 | Run
102 |
103 | OutputUUID
104 | DA9C8922-8278-44C9-9CB9-E771696776EC
105 | UUID
106 | ADCE8E8D-5993-47CE-A734-8720B8C75807
107 | UnlocalizedApplications
108 |
109 | Automator
110 |
111 | arguments
112 |
113 | 0
114 |
115 | default value
116 | on run {input, parameters}
117 |
118 | (* Your script goes here *)
119 |
120 | return input
121 | end run
122 | name
123 | source
124 | required
125 | 0
126 | type
127 | 0
128 | uuid
129 | 0
130 |
131 |
132 | isViewVisible
133 |
134 | location
135 | 724.500000:368.000000
136 | nibPath
137 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib
138 |
139 | isViewVisible
140 |
141 |
142 |
143 | connectors
144 |
145 | workflowMetaData
146 |
147 | applicationBundleID
148 | com.apple.finder
149 | applicationBundleIDsByPath
150 |
151 | /System/Library/CoreServices/Finder.app
152 | com.apple.finder
153 |
154 | applicationPath
155 | /System/Library/CoreServices/Finder.app
156 | applicationPaths
157 |
158 | /System/Library/CoreServices/Finder.app
159 |
160 | inputTypeIdentifier
161 | com.apple.Automator.nothing
162 | outputTypeIdentifier
163 | com.apple.Automator.nothing
164 | presentationMode
165 | 11
166 | processesInput
167 |
168 | serviceApplicationBundleID
169 | com.apple.finder
170 | serviceApplicationPath
171 | /System/Library/CoreServices/Finder.app
172 | serviceInputTypeIdentifier
173 | com.apple.Automator.nothing
174 | serviceOutputTypeIdentifier
175 | com.apple.Automator.nothing
176 | serviceProcessesInput
177 |
178 | systemImageName
179 | NSActionTemplate
180 | useAutomaticInputType
181 |
182 | workflowTypeIdentifier
183 | com.apple.Automator.servicesMenu
184 |
185 |
186 |
187 |
--------------------------------------------------------------------------------
/Finder/Automator/Mesh Hook.workflow/Contents/document.wflow:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | AMApplicationBuild
6 | 512
7 | AMApplicationVersion
8 | 2.10
9 | AMDocumentVersion
10 | 2
11 | actions
12 |
13 |
14 | action
15 |
16 | AMAccepts
17 |
18 | Container
19 | List
20 | Optional
21 |
22 | Types
23 |
24 | com.apple.applescript.object
25 |
26 |
27 | AMActionVersion
28 | 1.0.2
29 | AMApplication
30 |
31 | Automator
32 |
33 | AMParameterProperties
34 |
35 | source
36 |
37 |
38 | AMProvides
39 |
40 | Container
41 | List
42 | Types
43 |
44 | com.apple.applescript.object
45 |
46 |
47 | ActionBundlePath
48 | /System/Library/Automator/Run AppleScript.action
49 | ActionName
50 | Run AppleScript
51 | ActionParameters
52 |
53 | source
54 | on run {input, parameters}
55 |
56 | tell application "Finder"
57 | set _files to selection
58 | set _targets to _files
59 | if (count of _files) > 1 then
60 | repeat with _file in _files
61 | repeat with _target in _targets
62 | if _file is not equal to _target then
63 | tell application "Hook"
64 | set x to (percent encode POSIX path of (_file as string))
65 | set _src to make bookmark with data x
66 | set y to (percent encode POSIX path of (_target as string))
67 | set _tgt to make bookmark with data y
68 |
69 | hook _src and _tgt
70 | end tell
71 | end if
72 | end repeat
73 | end repeat
74 | else
75 | display dialog "2 or more files must be selected"
76 | end if
77 | end tell
78 |
79 | return input
80 | end
81 |
82 | BundleIdentifier
83 | com.apple.Automator.RunScript
84 | CFBundleVersion
85 | 1.0.2
86 | CanShowSelectedItemsWhenRun
87 |
88 | CanShowWhenRun
89 |
90 | Category
91 |
92 | AMCategoryUtilities
93 |
94 | Class Name
95 | RunScriptAction
96 | InputUUID
97 | FECBD813-5D3E-40C9-947F-54FB10C4313B
98 | Keywords
99 |
100 | Run
101 |
102 | OutputUUID
103 | DA9C8922-8278-44C9-9CB9-E771696776EC
104 | UUID
105 | ADCE8E8D-5993-47CE-A734-8720B8C75807
106 | UnlocalizedApplications
107 |
108 | Automator
109 |
110 | arguments
111 |
112 | 0
113 |
114 | default value
115 | on run {input, parameters}
116 |
117 | (* Your script goes here *)
118 |
119 | return input
120 | end run
121 | name
122 | source
123 | required
124 | 0
125 | type
126 | 0
127 | uuid
128 | 0
129 |
130 |
131 | isViewVisible
132 |
133 | location
134 | 724.500000:368.000000
135 | nibPath
136 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib
137 |
138 | isViewVisible
139 |
140 |
141 |
142 | connectors
143 |
144 | workflowMetaData
145 |
146 | applicationBundleID
147 | com.apple.finder
148 | applicationBundleIDsByPath
149 |
150 | /System/Library/CoreServices/Finder.app
151 | com.apple.finder
152 |
153 | applicationPath
154 | /System/Library/CoreServices/Finder.app
155 | applicationPaths
156 |
157 | /System/Library/CoreServices/Finder.app
158 |
159 | inputTypeIdentifier
160 | com.apple.Automator.nothing
161 | outputTypeIdentifier
162 | com.apple.Automator.nothing
163 | presentationMode
164 | 11
165 | processesInput
166 |
167 | serviceApplicationBundleID
168 | com.apple.finder
169 | serviceApplicationPath
170 | /System/Library/CoreServices/Finder.app
171 | serviceInputTypeIdentifier
172 | com.apple.Automator.nothing
173 | serviceOutputTypeIdentifier
174 | com.apple.Automator.nothing
175 | serviceProcessesInput
176 |
177 | systemImageName
178 | NSActionTemplate
179 | useAutomaticInputType
180 |
181 | workflowTypeIdentifier
182 | com.apple.Automator.servicesMenu
183 |
184 |
185 |
186 |
--------------------------------------------------------------------------------