I try to save script in front most window in AppleScript Editor to desktop as text without using GUI scripting.
tell application "AppleScript Editor" to save contents of document 1 as text in ((path to desktop) & "test.txt" as string)
applescript
I try to save script in front most window in AppleScript Editor to desktop as text without using GUI scripting.
tell application "AppleScript Editor" to save contents of document 1 as text in ((path to desktop) & "test.txt" as string)
Best Answer
To save it as a
.scpt
file for AppleScript Editor:To save as a plain
.txt
file, just change the middle line slightly