I updated the patch, I found the package `osx-lib` contains solution. So I removed the directly osascript process invocation.