How can I add a user input variable to a text file?
This is what I have right now:
-- ask user
display dialog "Enter Cheat" default answer "99 Gold, super health, unlimited Grenades.."
set cheat1 to (text returned of result)
-- create text file
set newText to "I am now
adding
a few
test lines"
do shell script "echo " & quoted form of newText & " >> ~/Desktop/test.txt"
I want to somehow put 'cheat1' inside the text file and not come out as cheat1, but as the text the user gave
any help?
Best Answer
Try the following:
Results: