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

+12 -2
View File
@@ -11,7 +11,18 @@ import Foundation
override func performDefaultImplementation() -> Any? {
guard let args = directParameter as? [URL] else { return nil }
QueueController.shared.insert(contentOf: args, at: 0)
QueueController.shared.insert(contentOf: args, at: QueueController.shared.count)
return nil
}
}
@objc(SBQueueStartAndWaitScriptCommand) class QueueStartAndWaitScriptCommand: NSScriptCommand {
override func performDefaultImplementation() -> Any? {
QueueController.shared.add(script: self)
QueueController.shared.start(self)
self.suspendExecution()
return nil
}
@@ -21,7 +32,6 @@ import Foundation
override func performDefaultImplementation() -> Any? {
QueueController.shared.start(self)
self.suspendExecution()
return nil
}