As per the help:
[quote] Alternatively, this can be an object that has the
Picture
method which returns the desired
Picture
object.[/quote\
So, if you do the following
function Yada()
{
Log.Picture(Sys.Desktop, "My Desktop")
}
This will take a picture of your current desktop. The same could be for any object that is visible on screen as TestComplete usually wraps it with a "Picture" method that will be called to capture the screenshot.
So, say I have a button on a web page, I could call
function yada()
{
Log.Picture(Aliases.iexplore.page("*").MyPanel.MyButton, "My button screenshot")
}