From a6f27a1fefce3a0a825eca3dbd502584411755f5 Mon Sep 17 00:00:00 2001 From: Toxblh Date: Thu, 12 Apr 2018 18:55:54 +0100 Subject: [PATCH] open preset for editing then you click by Preferences in menu. --- MTMR/AppDelegate.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MTMR/AppDelegate.swift b/MTMR/AppDelegate.swift index d15e6ca..4ebe7c7 100644 --- a/MTMR/AppDelegate.swift +++ b/MTMR/AppDelegate.swift @@ -28,6 +28,12 @@ class AppDelegate: NSObject, NSApplicationDelegate { @objc func testFn(_ sender: Any?) { let quoteText = "You click on menu" + let task = Process() + let appSupportDirectory = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).first!.appending("/MTMR") + let presetPath = appSupportDirectory.appending("/items.json") + task.launchPath = "/usr/bin/open" + task.arguments = [presetPath] + task.launch() print(quoteText) }