I tend to have a better understanding of shell scripts than apple script and as such I usally create shell scripts and then work out how to convert them to apple script.
As such I am having some trouble with a piece of code.
I want to open a finder and choose a folder as a path. (done).
I want to then write a file to that location using cat. (stuck).
So far I have
tell application "Finder"
activate
set the workingfolder to choose folder
end tell
do shell script "touch " & workingfolder & " /index.html"
do shell script "echo blah blah blah >> "& workingfolder & " /index.html"
any one got any ideas. using the following in terminal works 100%
set first_file to choose file without invisibles
set thepath to first_file as text
set theposix to POSIX path of thepath
tell application "Finder" to set image to (name of first_file)