Skip to content

Instantly share code, notes, and snippets.

@pryorda
pryorda / GetADPass
Last active December 17, 2019 22:42
Creating KeyBoard Shortcuts that work on MAC
on getFrontAppPath()
set frontAppPath to (path to frontmost application) as text
set myPath to (path to me) as text
if frontAppPath is myPath then
try
tell application "Finder" to set bundleID to id of file myPath
tell application "System Events" to set visible of (first process whose bundle identifier is bundleID) to false
-- we need to delay because it takes time for the process to hide