询问一下 applescript 编写问题

2022-07-03 09:04:07 +08:00
 shinonome
tell application "System Events"
	tell process "Script Editor"
		entire contents
	end tell
end tell

tell application "QQ" 
	tell process "QQ"
		entire contents
	end tell
end tell

只是改了名字,就报错了 Expected end of line but found “"”.,很迷惑啊

1611 次点击
所在节点    macOS
3 条回复
minamike
2022-07-03 09:12:42 +08:00
把第一个 QQ 改成 System Events
shinonome
2022-07-03 11:17:21 +08:00
@minamike 感谢,我傻了
nomagick
2022-07-03 11:20:30 +08:00
Apple script 根本就是一塌糊涂,好在后来支持了 javascript 语法,建议使用 javascript 语法
https://github.com/JXA-userland/JXA

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/863718

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX