dim SomethingOpen as string = "no"
If isPaused(Activity1) then SomethingOpen = "yes"
If isPaused(Activity2) then SomethingOpen = "yes"
If isPaused(Activity3) then SomethingOpen = "yes"
If isPaused(Activity4) then SomethingOpen = "yes"
If SomethingOpen = "yes" then
' run this code as one of the Activity's is open
end if