код (Отобразить)#define WS_CHILD 1073741824
#define WS_VISIBLE 268435456
#define WS_BORDER 8388608
#define LB_ADDSTRING 384
#define LB_SETCURSEL 390
#define WS_VSCROLL 2097152
#define LB_DELETESTRING 386
#define LB_GETCURSEL 392
#define LBS_NOTIFY 1
#define SS_NOTIFY 256
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll" );
int col, xek, yek;
getdisplay(col, xek, yek);
xek=xek/2-200; yek=yek/2;
int static;
int list;
int current_item=0;
createdialog(0);
showdialog(0, "скопировать",yek, yek, 380, 215, 1, 1);
for (int h=0; h<10; h++){
add_list(format(h));
}
loop()sleep(10);
function getmessage(0, WM_CREATE)
{
list=CreateWindow(0, "LISTBOX", "", LBS_NOTIFY | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_VSCROLL, 10, 10, 350,145, gethwnd(0), 0, 0, 0);
static=CreateWindow(0, "STATIC", "Скопировать текст", SS_NOTIFY | WS_CHILD | WS_VISIBLE, 25, 149, 400, 18, gethwnd(0), 0, 0, 0);
}
function add_list(string s)
{
new char c[size(s)+1];
strcpy(#c[0], s);
sendmessage(LB_AD\DSTRING, 0, address(#c[0]), formatiw(list));
delete c;
}
function getmessage(0, WM_COMMAND)
{
if(message.lparam==list)
{
current_item=sendmessage(LB_GETCURSEL, 0, 0, formatiw(list));
//textout(0, xek, yek, "Выбран пункт: "+format(current_item), 1);
sleep(200);
mouse(LEFT,175, 217);
sleep(200);
key(format(current_item));
}
}