Check if process is running Mac OS X then execute code
I am creating a script which clears the cache for Google Chrome. However, I would like to check if Chrome is open and if so not run the code but if it isn’t then it will execute the code. I can see that the Process Name is Google Chrome but the code doesn’t work.