I have this code from an "app" that I'm working on in AppleScript...
...however, when I run it, I get this:
How do you think I'd go about fixing this problem?
Code:
tell application "TextEdit"
activate
make new document
set theRAM to "java -Xms" & serverram & "M -Xmx" & serverram & "M -jar ~/Desktop/Bukkit\\ Server/CraftBukkit.jar"
set text of document 1 to theRAM as text
set thefilefolder2 to path to desktop folder as string
set thefilefolder2 to thefilefolder2 & "Bukkit Server:start.command"
save document 1 in thefilefolder2
close document 1 without saving
end tell
do shell script "cd ~/Desktop/Bukkit\\ Server/
chmod +x start.command"
...however, when I run it, I get this:
The document Untitled could not be saved as server.properties. You dont have permission.
How do you think I'd go about fixing this problem?