目录
目录README.md

ShortcutsKit

Easily run shortcuts, from your app!

The Shortcut Object

The Shortcut object provides all the information ShortcutsKit needs to run it.

import ShortcutsKit
let shortcut = Shortcut(name: "Shortcut Name!")  // Initialize
print(shortcut.name)  // Access Name

List Shortcuts

Quickly list all the shortcuts on a Mac by accessing the property shortcuts. Returns an array of Shortcuts.

import ShortcutsKit
let shortcuts = Shortcuts.default.shortcuts

Run Shortcuts

Finally, the thing you’ve been waiting for: Running shortcuts.

👉 Important note 👈 runShortcut blocks until the shortcut is finished running.

import ShortcutsKit
let shortcut = Shortcut(name: "Name")  // Initialize
Shortcuts.default.runShortcut(shortcut)  // Run the shortcut
关于
46.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号