AppleScript脚本学习记录《一》
tell命令块
tell application "Finder" display dialog "Hello World" end tell
声明变量
set theString to "Hello World" tell application "Finder" display dialog theString end tell
使用变量
--Integer Variables set theFirstNumber to 3 set the theSecondNumber to 2 --Variable Operations set theAnswer to (theFirstNumber + theSecondNumber) set theAnswer to (theAnswer + 1) --String Variables set theString to "3+2+1=" --Display Dialog tell application "Finder" display dialog theString & theAnswer end tell
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步