Hi, I am making a small plugin to send code to other applications such as R, Stata and iTerm. I am using Applescript though the system command osascript to achieve this. When I want to reactivate Sublime Text 2 through applescript, it crashes. Below is a minimum example. Any suggestions?
import sublime, sublime_plugin
def run(self, edit):
cmd = """osascript -e 'tell app "Finder" to activate' """
cmd2= """osascript -e 'tell app "Sublime Text 2" to activate' """