otterway uploaded a ninjascript with code to catch a full screenshot and store it to the harddrive. Here is the bulk of that code:
bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
// Create a graphics object from the bitmap
gfxScreenshot = Graphics.FromImage(bmpScreenshot);
// Take the screenshot from the upper left corner to the right bottom corner
gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
// Save the screenshot to the specified path that the user has chosen
bmpScreenshot.Save(path + ".png", ImageFormat.Png);
I don't know the chart controls too well, but it would be nice to capture just a screenshot of the chart the script is running. Also, would be nice to "BringToFront" if possible. I know there is a way to fine the XY values from the chart control but haven't done it before. Hoping Fat Tails or someone can help out here. I don't know if it would be chart function or some System function to pull the window to the front, otherwise if there are overlapping windows, we are likely to get just the overlap image and not the chart.
I think this is great for debugging scripts live as you can have a screen captures stored for each transaction!