V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
zer
V2EX  ›  问与答

Automator 中,如何获取文件的路径?

  •  
  •   zer · Aug 5, 2014 · 3269 views
    This topic created in 4286 days ago, the information mentioned may be changed or developed.
    想利用Automator弄个简单的ADB安装脚本,搜索了半天,也没搞明白怎么获得文件的路径
    tell application "Terminal"
    do script "adb install " & filepath
    end tell
    只要把filepath获取到就行了。
    1 replies    2014-08-05 16:11:46 +08:00
    zer
        1
    zer  
    OP
       Aug 5, 2014
    自己搞定了
    on run {input, parameters}
    set filepath to POSIX path of input
    tell application "Terminal"
    do script "adb install " & filepath
    end tell
    end run
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1330 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:04 · PVG 01:04 · LAX 10:04 · JFK 13:04
    ♥ Do have faith in what you're doing.