jijifujiji
V2EX  ›  macOS

请教如何用 AppleScript 获取选中的文本

  •  
  •   jijifujiji · Dec 21, 2020 · 2682 views
    This topic created in 1999 days ago, the information mentioned may be changed or developed.

    刚刚接触 AppleScript,我想写个脚本需要获取选中的文本。 请教如何获取

    2 replies    2020-12-26 21:36:12 +08:00
    fatestigma
        1
    fatestigma  
       Dec 22, 2020
    对于有 document container 的应用可以用
    tell application "<app name>" to get selection of document <doc index>
    jijifujiji
        2
    jijifujiji  
    OP
       Dec 26, 2020
    @fatestigma 好的谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   971 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 19:36 · PVG 03:36 · LAX 12:36 · JFK 15:36
    ♥ Do have faith in what you're doing.