procedure TConfigForm.ChooseScr(scr:WideString);
var i:Integer;
begin
if AutorunScrBox.Items.Count=0 then Exit;
for i:=0 to AutorunScrBox.Items.Count-1 do if WideCompareText(scr,AutorunScrBox.Items[i])=0 then begin
AutorunScrBox.ItemIndex:=i;
Break; end;
end;

procedure TConfigForm.AutorunScrBoxDropDown(Sender: TObject);
begin
//ShowMessage(AutorunScrBox.Text);
//AutorunScrBoxRefresh; // Flushes choosen scr
end;

procedure TConfigForm.AutorunScrBoxChange(Sender: TObject);
begin
SelfConf.WriteString('GUI','AutorunScr',UnicodeToHexStringW(AutorunScrBox.Text));
if AutorunScrBox.Text='' then begin DeleteFileW(AUTORUN_SCR); Exit; end;
CopyFileW95(AUTORUN_SCR_FOLDER+AutorunScrBox.Text+SCR_EXT,AUTORUN_SCR,False);
end;

procedure TConfigForm.AutorunScrBoxRefresh;
var sr:TSearchRecW;
procedure miAdd;
begin
AutorunScrBox.Items.Add(ExtractFileNameWithoutExtW(sr.Name));
end;
begin
AutorunScrBox.Items.BeginUpdate;
AutorunScrBox.Clear;
AutorunScrBox.Items.Add('');
if not DirectoryExistsW95(AUTORUN_SCR_FOLDER) then begin AutorunScrBox.Items.EndUpdate; Exit; end;
if FindFirstW(AUTORUN_SCR_FOLDER+'*'+SCR_EXT,faAnyFile,sr)=0 then begin
miAdd; while FindNextW(sr)=0 do miAdd;
FindCloseW(sr); end;
AutorunScrBox.Items.EndUpdate;
end;