Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions contrib/mac/app/startup.applescript
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
-- find out preferred terminal
try
tell application "Finder" to get application file id "com.googlecode.iterm2"
set termapp to "iTerm2"
on error
set termapp to "Terminal"
end try

set RootPath to POSIX path of (path to me)
tell application id "com.apple.terminal"
do script ("exec '" & RootPath & "Contents/Resources/julia/bin/julia'")
activate
set cmd to "exec '" & RootPath & "Contents/Resources/julia/bin/julia'"

tell application termapp
activate
-- create a new window, to avoid typing into existing one
tell application "System Events" to tell application termapp to keystroke "n" using command down
tell application "System Events" to tell application termapp to keystroke cmd & return
end tell