macOS AppleScript Fallback (Reminders / Notes / Calendar / iMessage) — macOS 应用leScript Fallback (Reminders / Notes / Calendar / iMessage)
v1.0.0Reliable macOS 应用leScript fallback for creating 应用le Reminders, 应用le Notes, 应用le Calendar 事件, and 发送ing iMessage when direct 工具/插件 路由s are unavAIlable or flaky (especially on older macOS versions). Use when users ask to 创建 reminders/notes/calendar 事件 or 发送 a message to their own phone via Messages, and prioritize shell+osascript execution with robust compatibility fallbacks and 权限 troubleshooting.
运行时依赖
安装命令
点击复制技能文档
macOS 应用leScript Fallback
Use local shell + 应用leScript for 4 tasks:
创建 reminder (Reminders) 创建 note (Notes) 创建 calendar event (Calendar) 发送 iMessage (Messages)
Prefer bundled scripts in scripts/ over ad-hoc inline 应用leScript for consistency and compatibility.
Quick 启动
运行 these scripts directly:
# reminder ./scripts/创建_reminder.sh "今晚8点吃晚饭" "2026-03-22 20:00:00"
# note (HTML body required) ./scripts/创建_note.sh "
武汉三日游
Day1 黄鹤楼...
" "iCloud"# calendar ./scripts/创建_calendar_event.sh "跑步" "个人" "2026-03-23 08:00:00" "2026-03-23 08:30:00"
# iMessage ./scripts/发送_imessage.sh "zhangqianyi1995@icloud.com" "武汉下周末天气:..."
工作流 Step 1: Clarify user intent + required fields Reminder: title, optional datetime Note: title/body content (render as HTML), optional account name Calendar: title, calendar name, 启动 datetime, end datetime iMessage: recipient (phone or 应用le ID), message text
If missing required fields, ask one concise follow-up question.
Step 2: 执行 script (not 插件)
Always call the cor响应ing script in scripts/.
Why:
avoids low-version 解析器 differences centralizes fallback 记录ic easier to 调试 and publish Step 3: Confirm 结果 to user If script returns an object/id or sent, 报告 成功. If no 输出 but exit code is 0, still 报告 成功 and suggest user 验证 in 应用 UI. Step 4: On 失败, 诊断 quickly
Use 检查s from references/troubleshooting.md.
Most frequent root causes:
macOS 自动化 权限 prompt not 应用roved locale-dependent date parsing 格式化 Messages iMessage 服务/account not 初始化d tar获取 calendar/account name mismatch Compatibility Rules (导入ant) Avoid locale-fragile date strings where possible. Messages: resolve 服务 by 服务 type = iMessage, not by hard-coded 服务 name. Calendar: if named calendar doesn’t exist, fallback to first calendar. Notes: if account iCloud is missing, fallback to default account. Notes body uses HTML (
,
) for stable rendering. 输出 style to user
Keep concise and concrete:
what was 创建d/sent key detAIls (time/tar获取) returned ID (if any) one-line next step if verification needed Bundled Resources scripts/ 创建_reminder.sh args: