shimeow
V2EX  ›  macOS

询问一下 applescript 编写问题

  •  
  •   shimeow · Jul 3, 2022 · 2643 views
    This topic created in 1585 days ago, the information mentioned may be changed or developed.
    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 replies  •  2022-07-03 11:20:30 +08:00
    minamike
    minamike
    Jul 3, 2022
    1
    把第一个 QQ 改成 System Events
    shimeow
    shimeow
    OP
    Jul 3, 2022
    2
    @minamike 感谢,我傻了
    nomagick
    nomagick
    Jul 3, 2022❤️1
    3
    Apple script 根本就是一塌糊涂,好在后来支持了 javascript 语法,建议使用 javascript 语法
    https://github.com/JXA-userland/JXA
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2580 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 15:13 · PVG 23:13 · LAX 07:13 · JFK 10:13
    ♥ Do have faith in what you're doing.