AppleScript记录

[TOC]


问题描述:

AppleScript超级有用

2.保存到本地的.scpt文件如何在terminal中运行?
osascript myScript.scpt


有用的网址:

1.AppleScript终极入门手册:
• 中文版:http://blog.csdn.net/yang3wei/article/details/7964226
• 英文版:http://computers.tutsplus.com/tutorials/the-ultimate-beginners-guide-to-applescript—mac-3436

3.更多资料见🍎官网:
https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html
https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptX/AppleScriptX.html


问题:

##1.怎么获取当前时间?

1
2
3
4
5
6
7
8
9
A quick note about getting the current time in AppleScript in two different formats. This command
set t to (time string of (current date))
yields something like this result (depending on the time of day):
"12:48:35 PM"
but this command
set t to (time of (current date))
yields something like this result:
46218
(That's the number of seconds since midnight, in case you were wondering.)

解决代码:


TODO:

  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
我知道是不会有人点的,但万一有人想不开呢?