Macos “我怎样才能打开?”;“网络”;带applescript的文件夹

Macos “我怎样才能打开?”;“网络”;带applescript的文件夹,macos,localization,applescript,finder,Macos,Localization,Applescript,Finder,我有这个剧本: set filename to getLocalizedString("Finder", "AXICON5") --set openIP to filename & PCIP tell application "Finder" to activate tell application "Finder" try --open folder openIP --on error errMsg number errNbr open fol

我有这个剧本:

set filename to getLocalizedString("Finder", "AXICON5")
--set openIP to filename & PCIP
tell application "Finder" to activate
tell application "Finder"
      try
     --open folder openIP
     --on error errMsg number errNbr
     open folder filename
      end try
 tell application "Finder" to activate
end tell
on getLocalizedString(a, x)
     tell application a to return localized string x
end getLocalizedString
我要做的是在“网络”文件夹中打开一个文件夹。如果失败,请打开“网络”文件夹。 更重要的是,该应用程序是用几种语言本地化的,因此,我使用函数getLocalizedString(a,x)从Finder.app获取localizedString“network”

问题来了。有些语言没有区分大小写的问题,比如汉语、日语。但是在英语中,我得到了字符串“network”,我无法进入文件夹。“网络”运作良好。
请帮忙

我很困惑。。。网络文件夹列出了您可以连接到的共享网络资源。您没有“打开”网络文件夹,而是先装入卷,然后在装入的卷上打开文件夹。我从未尝试打开网络文件夹中的文件夹。所以我不知道你想做什么

无论如何,关于本地化字符串问题,我没有看到它。首先让我告诉您,Finder没有“本地化字符串”命令;这是一个applescript命令。。。因此,您不应该告诉查找程序获取本地化字符串。第二,我是英国人,当我得到本地化字符串“Network”时,它是大写的,所以我不知道为什么你会得到小写的“n”

所以我对你正在做的几件事感到困惑。很抱歉,我帮不上什么忙。

我找到了一个解决方案。我使用 告诉应用程序“系统事件” 使用{shift down,command down}键击“k” 结束语
转到网络文件夹并获取其标题。然后我得到我想要的。

我不确定这是否有用

要在查找器窗口中显示网络文件夹,请执行以下操作:

tell application "Finder" to reveal folder "Network" of computer container
tell application "Finder" to open folder "Network" of computer container
要在查找器窗口中打开网络文件夹,请执行以下操作:

tell application "Finder" to reveal folder "Network" of computer container
tell application "Finder" to open folder "Network" of computer container
例如:

tell application "Finder"
    mount volume "smb://2TB._smb._tcp.local/Volume_1"
end tell

您好,谢谢您的关注。我有一个应用程序可以在我的本地网络中找到一些设备。当我选择设备时,我想在网络文件夹中打开设备的文件夹。至于字符串,因为我有几种语言要本地化,所以我必须获得本地化的“网络”字符串使用此函数将filename设置为getLocalizedString(“Finder”、“AXICON5”),您需要详细说明答案以及堆栈溢出代码。只是需要一些解释。