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
复制代码

 

posted @   OIMMZC  阅读(336)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示