Improve AppleScript support.

This commit is contained in:
Damiano Galassi committed 2019-03-11 21:41:17 +01:00
1 parent e16ea22a23
commit 8ad73726e5
5 files changed
+49 -42

No files matched your search

+10
View File
@@ -106,6 +106,10 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
notification.soundName = NSUserNotificationDefaultSoundName
NSUserNotificationCenter.default.deliver(notification)
}
for script in self.scripts {
script.resumeExecution(withResult: "Completed")
}
}
nc.addObserver(forName: Queue.Failed, object: queue, queue: main) { (note) in
@@ -282,6 +286,12 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
//MARK: Queue management
private var scripts: [NSScriptCommand] = []
func add(script: NSScriptCommand) {
scripts.append(script)
}
var status: Queue.Status {
get {
return queue.status