Get the window resolution parameters
Set Field [ OSD::g_Screenshot_WindowResolution; "0|0|" & Get(ScreenWidth) &"|" & Get(ScreenHeight) ]
#Capture the screenshot to the clipboard.
Set Field [ OSD::g_Screenshot_ErrorCode; External("Trgr-ScreenToClip"; "-unused|" & OSD::g_Screenshot_WindowResolution) ]
# Do the desired activity after capturing.Here i am pasting it in a container field to make the screenshot viewable.
If [ OSD::g_Screenshot_ErrorCode = 0 ]
Paste [ OSD::g_Screenshot_Image ]
Commit Records/Requests
Flush Cache to Disk
End If