Improve AppleScript support.
This commit is contained in:
5 files changed
+49
-42
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user