Swift program for getting a zoom app link from current or upcoming event in calendar.
Apple script calling the program and opening zoom.
function run(input, parameters) { | |
const appNames = []; | |
const skipAppNames = []; | |
const verbose = true; | |
const scriptName = 'close_notifications_applescript'; | |
const CLEAR_ALL_ACTION = 'Clear All'; | |
const CLEAR_ALL_ACTION_TOP = 'Clear'; | |
const CLOSE_ACTION = 'Close'; |
Swift program for getting a zoom app link from current or upcoming event in calendar.
Apple script calling the program and opening zoom.
Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.
To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:
tell application "System Preferences"
set CurrentPane to the id of the current pane
set the clipboard to CurrentPane
URL Schemes | |
Apple | |
Apple Music — music://geo.itunes.apple.com/us/albums/<albumID> | |
– music://geo.itunes.apple.com/us/artists/<artistID> | |
Apple News — applenews:// | |
App Store — itms-apps://itunes.apple.com/app/<appID> | |
Apple TV — videos:// |
NOTE (2022-07-09): Xcode finally added this functionality in Xcode 14, please see release notes here:
New Features in Xcode 14 Beta 3
When editing code, the Edit > Duplicate menu item and its corresponding keyboard shortcut now duplicate the selected text — or the line that currently contains the insertion point, if no text is selected. (8614499) (FB5618491)
import Cocoa | |
protocol AXUIProtocol { | |
func AXUIWindowArray(processIdentifier pid:pid_t) -> [AXUIElement] | |
func AXUIWindowArray(bundleIdentifier bid:NSString) -> [AXUIElement] | |
} | |
extension AXUIProtocol { | |
func AXUIWindowArray(processIdentifier pid:pid_t) -> [AXUIElement] { | |
let windowList : UnsafeMutablePointer<AnyObject?> = UnsafeMutablePointer<AnyObject?>.alloc(1) |
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561 | |
/* | |
* How to delete items from an Array in JavaScript, an exhaustive guide | |
*/ | |
// DON'T use the delete operator, it leaves a hole in the array: | |
var arr = [4, 5, 6]; | |
delete arr[1]; // arr now: [4, undefined, 6] |