Bad Boy JH
2010-12-13 02:26:44
function R_GetUpText: string;
var
MenuOptions: TStringArray;
First: String;
begin
MenuOptions := GetMenuText;
First := Trim(MenuOptions[0]);
if First <> 'Cancel' then
Result := First;
if (Length(MenuOptions) > 1) and (Result <> '') then
Result := Result+' / '+inttostr(Length(MenuOptions) - 2)+' more options';
end;Menu options also includes Cancel, so if there is no uptext then R_GetUpText returns "cancel"
it also returns
"Open Door / 4 more options"
when there are in reality only 2 more options (the uptext itself, and cancel).