on run set prolog to "/opt/local/bin/swipl" set myprompt to "Where do you keep your Prolog programs?" set dir to POSIX path of (choose folder with prompt myprompt) tell application "Terminal" activate do script "cd \"" & dir & "\"; " & prolog in window 1 end tell end run