gpt4 book ai didi

applescript - 使用 AppleScript 打开新的 Finder 窗口

转载 作者:行者123 更新时间:2023-12-04 17:49:18 32 4
gpt4 key购买 nike

如何在 AppleScript 中打开 Finder 的新窗口?我正在使用 if else 语句打开一个窗口。我试过 Osascript命令,但它给了我一个语法错误。代码如下:

if the button returned of the result is "Sleep" then
tell app "Finder" to go to sleep
if the button returned of the result is "Open Finder" then
osascript -e 'tell application "Finder" to open new window'
else
display dialog current time
end if

最佳答案

尝试:

tell application "Finder" to make new Finder window

关于applescript - 使用 AppleScript 打开新的 Finder 窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21188431/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com