I have an issue, when take a screenshot by given AFL code "GuiButton, GuiEdit, GuiToggle, GuiRadio, GuiDateTime, GuiSlider" are not visible in taken screenshot.
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
/////////////////////////////////////////
// control IDs
idEdit = 1;
function CreateGUI()
{
rc = GuiEdit( idEdit, 10, 20, 300, 30, notifyEditChange );
if( rc == guiNew ) GuiSetText("Initial text....................", idEdit );
}
CreateGUI();
_SECTION_BEGIN("Export Image PNG onClick");
Version (6.25);
exportPath = "C:\\ExportedImages\\";
fmkdir( exportPath ); // Create the path if it does not exists
exportButtonID = 1973; // Try toi use a unique ID to avoid potential conflicts
GuiButton( "Export", exportButtonID , 10, 50, 60, 28, notifyClicked );
id = GuiGetEvent( 0, 0 );
notify = GuiGetEvent( 0, 1 );
if( id == exportButtonID AND notify == notifyClicked )
{
AB = CreateObject("Broker.Application");
AW = AB.ActiveWindow;
AW.ExportImage( exportPath + Name() + ".png");
}
_SECTION_END();