3 @objc(ConfigureCommand)
4 class ConfigureCommand: NSScriptCommand {
5 override func performDefaultImplementation() -> Any? {
7 let args = self.directParameter as? [String: Any] ?? [:]
9 // Here you can extract the parameters from the args dictionary and configure your settings
10 let fps = args["fps"] as? Int
11 let outputs = OutputFormatSetting(args["outputs"] as? String ?? "")
12 let backend = URL(string: args["backend"] as? String ?? "")
13 let backendOutput = OutputFormatSetting(args["backend_output"] as? String ?? "")
14 let keepLocalFiles = args["keep_local_files"] as? Bool
16 let config = ConfigureAction(
21 backendOutput: backendOutput,
22 keepLocalFiles: keepLocalFiles
25 NotificationCenter.default.post(name: .setConfiguration, object: nil, userInfo: [
28 NotificationCenter.default.post(name: .reloadConfiguration, object: nil, userInfo: nil)
30 // Return a result if needed