0
let script = NSAppleScript.init(source: "tell application \"Safari\" to get URL of every tab of every window")
var errorInfo: NSDictionary?
let eventDescriptor:NSAppleEventDescriptor = (script?.executeAndReturnError(&errorInfo))!
print(eventDescriptor.stringValue)
이상은 nil을 반환합니다. 현재 URL을 반환하라는 말을하면 효과가 있습니다.
"tell application \"Safari\" to return URL of front document as string"
어떻게 모든 윈도우의 모든 탭에 열려있는 모든 URL을 얻으려면?