tell aplication “System Events” to name of processes contains AppName
gives a compiler error “Syntax error : parameter error” and highlights one of the quotations. (Weird)
Actually, the whole subroutine looks like:
on isRunning(AppName)
tell application “Finder” to name of processes contains AppName
set runningApps to (name of every process whose file type is “APPL”) as list
end tell
repeat with thisName in reverse of runningApps
if thisName contains AppName then
return true
endif
end repeat
return false
end isRunning
If I comment out the conditional (if - endif) I don’t get the “Scripting Component Error”
When I include it and get the option to edit the script, the word “AppName” (within the conditional) is highlighted as if this is the problem.
Maybe I’ll explicitly put in a character string instead of using AppName.