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
| // | |
| // ViewController.swift | |
| // Repnote | |
| // | |
| // Created by John Neumann on 05/07/2017. | |
| // Copyright © 2017 Audioy. All rights reserved. | |
| // | |
| import UIKit |
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 {input} | |
| set the_path to POSIX path of input | |
| set cmd to "vim " & quoted form of the_path | |
| tell application "System Events" to set terminalIsRunning to exists application process "Terminal" | |
| tell application "Terminal" | |
| activate | |
| if terminalIsRunning is true then | |
| do script with command cmd | |
| else | |
| do script with command cmd in window 1 |
OlderNewer