gpt4 book ai didi

applescript - AppleScript 中的名称扩展不起作用

转载 作者:行者123 更新时间:2023-12-04 05:24:20 28 4
gpt4 key购买 nike

我正在尝试显示我选择的文件的扩展名。我做错了什么?

    set theFile to (choose file with prompt "Select a file to transfer:")
set ext to name extension of theFile
display dialog ext as text

最佳答案

尝试:

tell application "System Events" to set ext to name extension of theFile

关于applescript - AppleScript 中的名称扩展不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13371926/

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