You are not logged in.
Let's say you have this code:
Applescript:
cd ~/Desktop
curl [url]http://www.macscripter.net/[/url] -o ms.html
cat ms.html >> AllMS.html
Simply use semicolons:
Applescript:
do shell script "cd ~/Desktop; curl [url]http://www.macscripter.net/[/url] -o ms.html; cat ms.html >> AllMS.html"
If you are working with a code more complex or pretty long, you can write it to an external file and run it from a do shell script statement. Eg:
Applescript:
set shellScript to "#!/bin/sh
if test -f ~/Desktop/ms.html; then
echo 'Groovy!'
else
echo 'Wait!'
fi"
set execFile to (open for access ("/tmp/sample" as POSIX file) with write permission)
write shellScript to execFile
close access execFile
do shell script "chmod 755 /tmp/sample; /tmp/sample | sh"
Offline