gpt4 book ai didi

applescript - 无效的 key 形式 applescript

转载 作者:行者123 更新时间:2023-12-02 03:53:52 28 4
gpt4 key购买 nike

我正在处理的程序中有以下代码

set outPath to "/Users/student/Desktop/Accounts.txt"
set x to text returned of (display dialog "Username" default answer "")
set y to text returned of (display dialog "Password" default answer "")
set RAccounts to (read POSIX file "/Users/student/Desktop/Accounts.txt")
if file path outPath exists
then
get word 1
else

然后它继续,但是每当我尝试编译它时,它都会给我以下错误

invalid key form

有什么帮助吗?

最佳答案

尝试:

set outPath to "/Users/student/Desktop/Accounts.txt"
set x to text returned of (display dialog "Username" default answer "")
set y to text returned of (display dialog "Password" default answer "")
try
set RAccounts to read POSIX file outPath
on error
-- file outPath does not exist … do things
end try

tell application "Finder"
if exists POSIX file "/Users/student/Desktop/Accounts.txt" then
beep
else
beep 2
end if
end tell

关于applescript - 无效的 key 形式 applescript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13485388/

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