jijifujiji
V2EX  ›  macOS

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

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

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

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