Skip to content

Commit

Permalink
Add basic AppleScript to work with Hook
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanzhong committed Sep 24, 2022
1 parent 4e535fe commit 5754709
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- [Shortcuts](integration/shortcuts.md)
- [Working Copy](integration/working-copy.md)
- [TextExpander](integration/text-expander.md)
- [Hook](integration/hook.md)
- [URL Schemes](integration/url-schemes.md)
- Privacy & Terms
- [Private Policy](privacy.md)
Expand Down
1 change: 1 addition & 0 deletions docs/cn/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- [快捷指令](cn/integration/shortcuts.md)
- [Working Copy](cn/integration/working-copy.md)
- [TextExpander](cn/integration/text-expander.md)
- [Hook](cn/integration/hook.md)
- [URL Schemes](cn/integration/url-schemes.md)
- 隐私和条款
- [隐私政策](cn/privacy.md)
Expand Down
27 changes: 27 additions & 0 deletions docs/cn/integration/hook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Hook

[Hook](https://hookproductivity.com/) 是一个效率应用,通过 Deep Link 来连接应用程序。

Taio 增加了基本的 [AppleScript](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html) 支持,以便与 Hook 一起工作。

## 获取文档链接

要获得当前文档的链接,请使用如下所示的 AppleScript 脚本:

```
tell application "Taio"
get url of active document
end tell
```

## 获取文档名称

要获得当前文档的名称,请使用如下所示的 AppleScript 脚本:

```
tell application "Taio"
get name of active document
end tell
```

> 要了解更多关于 AppleScript 和 Hook 的信息,请参考上面提到的它们的官方文档。
27 changes: 27 additions & 0 deletions docs/integration/hook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Hook

[Hook](https://hookproductivity.com/) is a productivity app that connects apps by leveraging deep links.

Taio has added basic [AppleScript](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html) support to work with Hook.

## Get Document URL

To get the URL of the active document, use AppleScript like below:

```
tell application "Taio"
get url of active document
end tell
```

## Get Document Name

To get the name of the active document, use AppleScript like below:

```
tell application "Taio"
get name of active document
end tell
```

> To learn more about AppleScript and Hook, please refer to their official documentations mentioned above.

0 comments on commit 5754709

Please sign in to comment.