Automation & Scripting

RSS for tag

Learn about scripting languages and automation frameworks available on the platform to automate repetitive tasks.

Automation & Scripting Documentation

Post

Replies

Boosts

Views

Activity

iOS Shortcuts Error Codes/Status
I’ve two automations set. Send a notification when battery rises above 80% Set Always ON display off on apple watch (via Shortcuts Automation, everyday at 12 a) For these aforementioned shortcuts I get the following errors frequently, on my Lock Screen, Wha is INCExtensionErrorDomain error 1307 and Remote execution timed out error? And how can these errors be mitigated?
0
0
116
1w
Version 15.4 (15F31d) Xcode NSAppleScript of Safari broken
All attempts to script Safari in Xcode using NSAppleScript returns the following message. error: { NSAppleScriptErrorAppName = Safari; NSAppleScriptErrorBriefMessage = "Application isn\U2019t running."; NSAppleScriptErrorMessage = "Safari got an error: Application isn\U2019t running."; NSAppleScriptErrorNumber = "-600"; NSAppleScriptErrorRange = "NSRange: {32, 3}"; } Latest script attempt: func getHTML() -> String { let source = """ tell application "Safari" get URL of tab 1 of window 1 end tell """ //print(source) var a = "hello" var error: NSDictionary? if let scriptObject = NSAppleScript(source: source) { if let scriptResult = scriptObject.executeAndReturnError(&error).stringValue { a = scriptResult print(scriptResult) } else if (error != nil) { print("error: ",error!) } } return a }
3
0
146
6d