set appNames to {"WeChat","QQ"} -- 将要隐藏的进程名称放入数组中tell application "System Events"repeat with appName in appNamesset appProcess to first process whose name is appNameset appId to id of appProcesstell process appNameset visible to falseend tellend repeat
end tell