1
Ich versuche ein AppleScript zu erstellen, das ein Dokument öffnet und alles, was ich in das Textfeld eintippe, zum Dokument hinzufügt und dann in einem Pfad speichert. Wenn ich versuche, es zu speichern, sagt es nur "konnte x nicht speichern, weil die Datei nicht existiert."Erstellen eines AppleScript-Adressbuchs
Hier ist mein Code
display dialog "username" default answer ""
set the target_username to the text returned of the result
display dialog "password" default answer "" with hidden answer
set the pass to the text returned of the result
if target_username is "Plasma" and pass is "Sship" then
display dialog "Welcome! Please select a function!" buttons {"Add address", "View address"}
if button returned of result is "Add address" then
set booka to text returned of (display dialog "rers!" default answer "")
tell application "TextEdit"
activate
make new document
set text of document 1 to booka
delay 10
set thePath to "/Users/Cameron/Desktop/"
set thedoc to document 1
set thetitle to "food"
save thedoc in (thePath & thetitle)
end tell
else
display dialog "no"
end if
else
display dialog "no"
end if
}
es immer noch nicht funktioniert, es gibt mir den gleichen Fehler – PLASMAGHOST
Script arbeitet für mich, natürlich ‚Cameron‘ von durch eigenen Benutzernamen ersetzen. Sind Sie sicher, dass Ihr Benutzer "Cameron" ist? (das ist das einzige, was ich nicht testen kann) – pbell
ok es hat funktioniert, danke! – PLASMAGHOST