Terminal 如何从AppleScript运行终端命令?

Terminal 如何从AppleScript运行终端命令?,terminal,applescript,Terminal,Applescript,基本上,我想抓取一个截图,当下载完成传输 此代码在终端中工作 do shell script "screencapture -l$(osascript -e 'tell app 'Transmission' to id of window 1') ~/tempDirectory/test.png" 您尝试在applescript中的shell脚本中运行applescript。试一下(未经测试): 您的代码的哪一部分不起作用? screencapture -l$(osascript -e 'te

基本上,我想抓取一个截图,当下载完成传输

此代码在终端中工作

do shell script "screencapture -l$(osascript -e 'tell app 'Transmission' to id of window 1') ~/tempDirectory/test.png"

您尝试在applescript中的shell脚本中运行applescript。试一下(未经测试):


您的代码的哪一部分不起作用?
screencapture -l$(osascript -e 'tell app 'Transmission' to id of window 1
tell application "Transmission" to set wid to id of window 1

do shell script "screencapture -l" & wid