Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

List The Foreground Apps Running On A Mac With JavaScript

#!/usr/bin/env osascript -l JavaScript

const sysEvents = Application("System Events")
const allProcesses = sysEvents.processes
const foregroundProcesses = allProcesses.whose({"backgroundOnly": {'=': false }})

for (let pIndex = 0; pIndex < foregroundProcesses.length; pIndex ++ ) {
    ``${pIndex} - `` +
    ``${foregroundProcesses[pIndex].name()} - `` +
results start

- Some display names are different from the internally used names. For example, "Electron" and "Code"