Last active
August 3, 2019 11:19
-
-
Save jeetsukumaran/5400816 to your computer and use it in GitHub Desktop.
AppleScript to open a new MacVim buffer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run | |
tell application "System Events" | |
set currProcs to (name of processes) | |
set MacVimRunning to (currProcs contains "MacVim") | |
if not MacVimRunning then | |
tell application "MacVim" to activate | |
end if | |
tell process "MacVim" | |
click menu item "New Window" of menu "File" of menu bar 1 | |
set visible to true | |
end tell | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to have AppleScript type commands into the new window?
For example, if I want to open a vim session on startup, I type the following command:
Is there a way to automate this using AppleScript?