Forum Discussion
Bjoernw
9 years agoNew Contributor
Hello,
me again ;)
how would the code Shankar_R posted would look like in DelphiScript?
thanks again
tristaanogre
9 years agoEsteemed Contributor
Forgive me, it's been YEARS since I've had to write DelphiScript... so... here's my best guess:
function fn_selectlistvalue(objListbox,str_valetoSelect)
var vitemcount;
var result;
begin
result := false;
vitemcount := objListbox.wItemCount;
for lsti:= 0 to vitemcount-1 do
begin
if (aqString.Compare(aqConvert.VarToStr(objListBox.wItem(lsti)), str_valuetoselect, false) = 0 then
begin
objListbox.ClickItem(lsti);
result := true;
end;
end;
fn_selectlistvalue := result;
end;