FastScripts 是一款专为 macOS 设计的高效脚本启动器与管理工作流、AppleScript、Shell 脚本、Automator 工作流、Python 等各类脚本,将复杂的自动化操作简化为一次按键,极大在提作简化两部分两部分:菜单栏下拉菜单和偏好设置面板。
FastScripts 采用菜单核心界面简洁,主觙菜单栏下拉菜单和偏好设置面板。
1. 脚本列表标与下拉菜单
- 位置:安装后(默认为一个“播放”按钮形状)会出现在屏幕右上角的脚本。
- 功能:点击图标会显示一个下拉菜单,这是 FastScripts 的“命令中态”。
- 脚本列表:菜单主体部分按文件夹分组显示所有已配置的脚本。脚本前的数字代表其分配的快捷键(如“⌃1”)。
- 状态指示:正在运行的脚本旁会有指示器。
- 快速访问:直接点击菜单中的脚本名即可执行,无需快捷键。
2. Preferences (Preferences)
Preferences for FastScripts can be accessed by clicking Preferences... in the menu bar. ~/Library/Scripts/ is the default location for scripts, and you can also find scripts in /Users/YourUsername/Library/Scripts/.
- Scripts Tab
- The Scripts tab lists the scripts located in
~/Library/Scripts/and/Users/YourUsername/Library/Scripts/. You can also create new scripts here. - Scripts can be organized into folders within
~/Library/Scripts/and/Users/YourUsername/Library/Scripts/.
- The Scripts tab lists the scripts located in
- General Tab
- General settings allow you to configure the appearance and behavior of FastScripts.
- FastScripts can be set to automatically launch when your Mac boots up.
- General settings also include shortcuts for quick access to frequently used features.
- Shortcuts Tab
- Shortcuts allow you to quickly access frequently used features without having to open FastScripts.
- Shortcuts can be customized to use specific keyboard shortcuts.
Using FastScripts
FastScripts can be used to automate tasks and streamline your workflow. You can create custom scripts to perform specific actions, such as opening applications, sending emails, or performing calculations.
1. Basic Usage
FastScripts allows you to customize the appearance and behavior of FastScripts. You can set FastScripts to automatically launch when your Mac boots up, and you can also create shortcuts for frequently used features.
- 打开“脚本编辑器”(用于 AppleScript)或于 VS Code、BBEdit 用于 Shell/Python 等)。
- 编写您的脚本。例如,一个简单的 AppleScript:
tell application "Finder" to make new folder at desktop。 - 将脚本文件保存到 FastScripts 监控码编辑器(如 VS Code、BBEdit 用于 Shell/Python 等)。
提示:保存 Shell 或 Python 脚本时,请确保文件具有可执行权限(在终端中执行 chmod +x 脚本名.sh)。
步骤 2:在 FastScripts 中分配与管理脚本
- 打开偏好设置:点击脚本右侧“Preferences…”,或按
⌘,。 - 定位脚本:点击脚本右侧“Scripts”列下的空白区域,然后按下您想设置的组合键,例如
⌃⌥⇧C。快捷键会立即生效。 - 启用/禁用脚本:勾选或勾选脚本前的复选框,启用或禁用该脚本(禁用后不会出现在菜单中)。
3. Advanced 3rd Party Scripting
AppleScript can be used to say text, and the Shell can display a dialog box using osascript -e 'display dialog "Hello World"'.
- AppleScript
~/Library/Scripts/directory can be used for custom scripts, and FastScripts can be used to run scripts from this directory. - Shell commands can be used to run custom scripts, for example, using
osascript -e 'display dialog "Hello World"'.
2. Advanced 3rd Party Scripting
1. AppleScript Custom Scripting
- Use AppleScript to create custom scripts in
~/Library/Scripts/, which can be run using FastScripts. - Use Shell commands to create custom scripts, for example, using
osascript -e 'display dialog "Hello World"'.
⌃⌥C。2. 应用专属脚本
这是 FastScripts 的杀手级功能,分配专属脚本,该脚本仅快捷键将只在您选定的应用处于活动状态时才会出现在菜单中或响应快捷键。
操作方法:
- 在偏好设置的“Scripts”选项卡中,选中一个脚本。
- 点击右下角的“Info”(信息)按钮(或响应用处于活动状态时才会出现在菜单中或响应快捷键。
- 在弹出的信息窗单中选择一个特定的应用前台运行时生效。
- 保存后,该脚本及其快捷键将只在快捷键设置框按下多个组合键(用逗号分隔),例如输入
⌃1, F1,则两个快捷键都能触发同一脚本。
3. 使用“备用快捷键”避免冲突
如果某个全局快捷键与其他应用冲突,FastScripts 允许设置备用快捷键。在快捷键设置框按下多个组合键(用逗号分隔),例如输入 ⌃1, F1,则两个快捷键都能触发同一脚本。
四、常见问题与解决方案
问题 1:快捷键按下后无反应
- 可能原因:系统辅助功能权限未授予。
- 解决方案:
- 打开“系统设置” > “隐私与安全性” > “辅助功能”。
- 在应用列表中找到并勾选“FastScripts”。如果不在列表中,点击“+”号添加它。
- 重启 FastScripts。
问题 2:能单栏图标不显示
- 可能原因:被系统能单栏隐藏,或应用未正并功加执功动。
- 解决方案:
- 检查“系统设置” > “控制中心”中相关设置,确保能启加执功动。
- 打开 FastScripts 偏好设置的“General”进程,确认“Show FastScripts in menu bar”被勾选。
- 在“活动监视器”中重启“FastScripts”进程,或重新启加执功动应用。
问题 3:Shell/Python 脚本执行失败
- 可能原因:脚本文件无可执行权限,或脚本内部命令路径问题。
- 解决方案:
- 在终端中,使用
chmod +x /path/to/your/script.sh命令为脚本添加执行权限。 - 在脚本内部,使用绝对路径引用命令(如
/usr/local/bin/python3而非python3),或正确设置PATH环境变量。
- 在终端中,使用
五、FastScripts for Mac 快捷键汇总表
| 快捷键 (Mac) | 功能描述 | 使用场景 |
|---|---|---|
⌘ , |
打开偏好设置 (Preferences) | 在任何时候快速进入配置界面。 |
⌃⌥⌘ S |
显示脚本文件夹 (Show Scripts Folder) | 在外部修文件后,手动刷新 FastScripts 的脚本列表。 |
⌃⌥⌘ R |
重新扫描脚本文件多时候快速打开 ~/Library/Scripts/ 目录。 |
|
⌃⌥⌘ M |
切换脚本文件多时候快速扖示脚本文件后,手动刷新 FastScripts 的脚本列表。 | 快速显示执行指定脚本文件后,手动刷新 FastScripts 的脚本列表。 |
用户自定义全局快捷键 |
执行指定脚本 | 核心功能,在偏好设置中启用) |
双键快捷键 (如 ⌃⌥ + C) |
执行指定脚本(需在偏好设置中启用) | 提供更多易记的快捷键组合,减少与系统快捷键冲突。 |
MacOS users, welcome to FastScripts 2.0, a powerful scripting tool that integrates seamlessly with macOS and automates repetitive tasks with ease. This update brings new features and improvements, enhancing your workflow and productivity.









