Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

執行 AppleScript 指令碼,並傳回該指令碼所傳回的值 (如果有的話)。

語法

MacScript ( script )

script 引數是字串運算式。 運算式內容可以是一系列 AppleScript 指令,也可以指定 AppleScript 指令碼或指令碼檔案的名稱。

備註

若要建立多行指令碼,可以在字串內嵌入歸位字元 (Chr(13))。

範例

此範例會使用 MacScript 函數來開啟 [選擇檔案] 對話方塊 (Macintosh 的標準檔案對話方塊)。 函數會傳回使用者所選取之檔案的完整路徑。 路徑規格前面會加上檔案類型 (若適用)。

ThePath$ = Macscript("ChooseFile")

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×