Here, not tested at all, but put together the code you have already how I think it should run. Quite possible something is not correct and I don't have the enum UDF listed here either which you will need in your script or a call to it.

Code:
$ArrayComputers=@wksta,'other computers'
$Processes='long list of procs'
For Each $Computer in $ArrayComputers
If Ping($Computer)
For Each $proc in $processes
EnumProcess($proc, , $Computer)
$=SendMessage(@wksta,$computer +' is running '+ $proc)
Next
Else
$=SendMessage(@WKSTA,$computer +' was not able to be pinged. It is unavailable.')
EndIf
Next
Exit 1
 
Function Ping($PC)
Shell'%comspec% /c ping -n 1 '+$PC+' >nul'
$Ping = NOT @error
EndFunction