Dim bmp As Bitmap
For Each module As Object In Array (Main, Activity2, AnyOtherActivity)
If IsPaused(module) = False Then
bmp = CallSub(module, "TakeScreenshot") 'there should be a TakeScreenshot sub in each of the activities.
End If
Next
If bmp.IsInitialized Then
...
End If