V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
shinonome
V2EX  ›  macOS

询问一下 applescript 编写问题

  •  
  •   shinonome · 2022-07-03 09:04:07 +08:00 · 1602 次点击
    这是一个创建于 655 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 “"”.,很迷惑啊

    3 条回复    2022-07-03 11:20:30 +08:00
    minamike
        1
    minamike  
       2022-07-03 09:12:42 +08:00
    把第一个 QQ 改成 System Events
    shinonome
        2
    shinonome  
    OP
       2022-07-03 11:17:21 +08:00
    @minamike 感谢,我傻了
    nomagick
        3
    nomagick  
       2022-07-03 11:20:30 +08:00   ❤️ 1
    Apple script 根本就是一塌糊涂,好在后来支持了 javascript 语法,建议使用 javascript 语法
    https://github.com/JXA-userland/JXA
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   938 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 21:43 · PVG 05:43 · LAX 14:43 · JFK 17:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.