Kibor Bot Autoclicker » Kibor - Integrated development environment for bots » Issues and problem solving » Saving dialog settings

Страниц (1): [1]
 

1. Segulb - 05 Декабря, 2017 - 19:03:13 - перейти к сообщению
Tell me how to save the dialog settings entered?
2. Kibor - 06 Декабря, 2017 - 04:37:24 - перейти к сообщению
CODE:
int n1;
int n2;

n1=formatsn(getcontrol(EDIT_0));
n2=formatsn(getcontrol(EDIT_1));

if (fopen ("C:\config.txt", "w")!=0)
{
fwrite(n1);fwrite (ENDL);
fwrite(n2);
fclose();
}

/////////////////////////////////

messagebox (n1);
messagebox (n2);




INITDIALOG
{
if (fopen ("C:\config.txt", "r")!=0)
{
fread(n1);
fread(n2);
fclose();

sendcontrol(EDIT_0, format(n1));
sendcontrol(EDIT_1, format(n2));
}
}


CREATE_INTERFACE
{
DIALOG "Name of the window" 237 180 //SizeX SizeY
BUTTONSCRIPT "Start" 125 121 100 25 //PositionX PositionY SizeX SizeY
//Adding Controls ......
STATIC_0 "Static text" 10 10 90 18 //PositionX PositionY SizeX SizeY
EDIT_0 "55" 105 8 120 18 //PositionX PositionY SizeX SizeY
STATIC_1 "Static text1" 10 310 90 18 //PositionX PositionY SizeX SizeY
EDIT_1 "22" 105 28 120 18 //PositionX PositionY SizeX SizeY
}

Powered by ExBB FM 1.0 Final