Applescript won't open applications on my external monitor
- by jpadvo
I'm trying to open a new MacVim window with Applescript, and have found partial success with this:
do shell script "cd \"~/code/application\"; ~/bin/mvim > /dev/null 2>&1"
This works fine, and opens a new MacVim window with it's working directory set to ~/code/application. BUT it always opens on the screen of my laptop, not on the external monitor with the currently active space where I am working.
Is there a way to get MacVim to open in the current space?
Edit: same problem with opening a finder window:
tell application "Finder" to make new Finder window