Page 1 of 1

Multiply result

Posted: 2007-10-21 21:37:53
by sweborn
How multiply i the result value of a customer rating. I want the result showing the double sum. The reason is that discshop's (discshop.se) ratings are between 1 and 5 and in AMC is the highest value 10.

Code: Select all

// Rating
  if CanSetField(fieldRating) then
  begin
    Value := TextBetween(PageText, 'Kundbetyg:', '<br>');
    Value := TextBetween(Value , '<b>', '</b>');
    SetField(fieldRating, Value);
  end;

Posted: 2007-10-21 22:04:43
by sweborn
I found the solution.

Code: Select all

// Rating
  if CanSetField(fieldRating) then
  begin
    Value := TextBetween(PageText, 'Kundbetyg:', '<br>');
    Value := TextBetween(Value , '<b>', '</b>');
    SetField(fieldRating, FloatToStr(StrToFloat(Value)*2));
  end;