I’ve been working on an AppleScript that opens up Terminal and runs some commands. I can open terminal but I don’t know which command to use to type the terminal command. ie:
tell app “Terminal”
run
Activate
“unknown command” “cd /users/ianholm/documents”
end tell
So if someone could tell me that command, that would be great.
tell application "Terminal"
activate
do script "cd /users/ianholm/documents"
end tell
I’ve the same problem. I need to give 2 commands: a “cd” command and a “sudo” is it possible? Is there another way to launch as a superuser an app.? Through a finder applescript? Thx
Thanks StephanK,
I can’t find the way. The problem is that to access my proxy server I have to give some terminal commands (to activate Stunnel) and it’s quite annoying. So I’m trying to find out a way to do it automatically on launch. Tried with automator (find the executable file and opening it) but it doesn’t work. So I’m trying with a script.
The commands are: