AppleScript 笔记
来源:互联网 发布:上传小说的软件 编辑:程序博客网 时间:2024/05/17 05:08
1. 清空回收站
tell application "Finder"
empty the trash
end tell
2. "咚" 一声儿
been
3. 可以执行shell代码
例如: do shell script "ls"
4.定义变量
set n to "12" as number
set m to 12 as string
display dialog n
display dialog m
5.打开应用
tell application "System Events"
tell process "Firefox"
set frontmost to true
end tell
end tell
6.每隔0.1秒 按键Hi 当按下 com 键停止
use framework "Foundation"
tell application "System Events"
tell process "TextEdit"
set frontmost to true
end tell
repeat
keystroke "Hi"
delay 0.1
set flag to my BWAND((current application's NSEvent's modifierFlags()), (current application's NSCommandKeyMask)) > 0
if flag is true then exit repeat
end repeat
end tell
on BWAND(__int1, __int2)
set theResult to 0
repeat with bitOffset from 30 to 0 by -1
if __int1 div (2 ^ bitOffset) = 1 and __int2 div (2 ^ bitOffset) = 1 then
set theResult to theResult + 2 ^ bitOffset
end if
set __int1 to __int1 mod (2 ^ bitOffset)
set __int2 to __int2 mod (2 ^ bitOffset)
end repeat
return theResult as integer
end BWAND
- AppleScript 笔记
- AppleScript学习笔记(一)初识AppleScript
- AppleScript
- AppleScript
- "The Development of AppleScript"的笔记
- AppleScript学习笔记(三)捕捉错误
- AppleScript学习笔记(二)AppleScript的四种数据类型
- AppleScript学习笔记(四)条件语句和循环语句
- AppleScript学习笔记(五)文件夹,文件和路径
- AppleScript学习笔记(六)处理程序Handler
- AppleScript脚本
- AppleScript入门
- AppleScript语言简介
- AppleScript语言简介
- Mac Applescript 脚本
- AppleScript 读写plist文件
- 关于AppleScript一些记录
- applescript 按键对应编码
- JAVA冒泡排序
- A requirement that almost every single application has is "I want to scale up an ImageView proportio
- python-mongodb存储文件
- java 多线程深入浅出的分析
- HOG特征向量的代码
- AppleScript 笔记
- Android Intent Standard Actions
- HOG特征
- File类的常用方法
- 查找某个目录下的所有文件(包括子目录)
- 奋斗了一个假期
- vs常用快捷键
- netbeans中如何通过按钮跳转页面
- 数组