I want to send commands from TextWrangler to the terminal. Even if I found this, I don't understand how that works since I'm brand new to Unix and running Applescripts.
tell application "TextWrangler"
set the_selection to (selection of front window as string)
if (the_selection) is "" then
set the_selection to line (get startLine of selection) of front window as string
end if
end tell
tell application "Terminal"
do script with command the_selection in window 1
end tell
I saved an Applescript that looks like this:
Now, what I think is to put the script in the TextWrangler Scripts Folder:
- But then, how do I send commands to the Terminal.app?
- How can I press cmd + enter to send a line from TextWrangler to the Terminal?
Best Answer
You must put the script in the
"/Users/yourName/Library/Application Support/TextWrangler/Scripts"
folderAfter that: