You don’t need the on run. You’ll also need to make sure you’re using POSIX paths. Try this: tell application "System Events" set runningProcesses to (every process whose background only is false) end tell set alfredJSON to "{\"items\": [" repeat with runningProcess in runningProcesses set appName to name of runningProcess set appPath to POSIX path of (file of runningProcess as alias) set alfredJSON to alfredJSON & "{\"uid\": \"" & appName & "\", \"type\": \"default\", \"ti