setting a variable to open applications

does anybody know the syntax to set a list variable (i.e. theList) to the names of open applications??? much appreciated.

Ben

tell application "System Events" to set theList to (name of processes whose visible is true)

The “Finder” can also be used to do this, but I believe using system events is the preferred method. Delete ‘whose visible is true’ if you want to list all processes, including system and invisible processes.

j