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 @ 2017-10-13 10:49  OIMMZC  阅读(342)  评论(0)    收藏  举报