All credits go to RSN
IF you are planning to make a script makess sure to follow those standarsQuote:
Originally Posted by RsN
- We use a ; after every statement and also every end that is not followed by an else has it.
- We use two spaced tabs to set this configuration go in scar to Tools > Options... > General Settings - Used fixed size tabs - 2
- We always use a spaces after ,'s
- We dont capitalize words Scar makes bold
- We Capitalize firts letter of all types (e.g: Integer, String, Boolean, etc);
- For parenthesis surrounded by letters, we use a space separator (e.g: if ((this) or (that)) then)
- for cases use this example
RsNCode:function ClickOption(s : String; i : Integer) : Boolean; //by RSN
var
x, y, tmpMask : Integer;
begin
tmpMask := CreateBitmapMaskFromText(s, UpChars);
case i of
1 :
begin
if (FindBitmapMaskTolerance(tmpMask, x, y, 0, 0, 520, 340, 10, 50)) then
begin
Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, True);
Result := True;
Wait(250);
end;
end;
2 :
begin
if (FindBitmapMaskTolerance(tmpMask, x, y, 550, 200, 750, 470, 10, 50)) then
begin
Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, True);
Result := True;
Wait(250);
end;
end;
3 :
begin
if (FindBitmapMaskTolerance(tmpMask, x, y, 0, 340, 500, 460, 10, 50)) then
begin
Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, True);
Result := True;
Wait(250);
end;
end;
end;
FreeBitmap(tmpMask);
end;
