http://www.villavu.com/forum/showthread.php?t=36898?t=39721&highlight=nava2Can you see this thread? It's in the public test corner, so I think you can?
eh, if not, here you go:
Direct quote from the how to fix smart thread:
From: nava2
PLEASE NOTE:
It has come to my attention that SMART v4 is not working correctly. You may try to use these procedures, they work for most. Try them either way SMART Cannot focus on the client. It does not work as it should. Sorry, but BenLand100 is working to correct this. You have been told.
Another note, do NOT use Visual Tool Tip to view SMART while it runs, it causes the canvas to become active, and in turn, activate/change. It will cause SMART to stop working and you will have to restart your script.
Just to help out…
Firstly, Replace SMART.scar with this:
function IsKeyDown(C:Char): Boolean;
begin
Result := SmartIsKeyDown(ord(c));
end;
procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;
procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;
procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;
procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;
procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;
procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;
procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;
function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;
procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;
function FindWindow(Title: String): Boolean;
begin
result:= true;
end;
procedure ActivateClient;
begin
end;
function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;
// SRL Development Team
procedure SmartSetupEx(worldnumber: integer; members, signed, superdetail: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup('http://'+prefix+'.runescape.com/', 'plugin.js?param=o0,a' + IntToStr((Integer(not(Signed)) + 1) * Integer(not((SuperDetail and Signed)))) + ',m' + IntToStr(Integer(Members)));
end;
Procedure SaveScreenshot(s : string);
var
TempBMP : integer;
TempS : String;
begin;
Temps := s;
While FileExists(Temps) do
begin;
Temps := ExtractFilePath(s) + Copy(ExtractFileName(Temps),1,LastPos('.',ExtractFileName(Temps))-1) + '2' + ExtractFileExt(s);
Writeln(Temps);
end;
TempBMP := BitmapFromString(765,503,'');
Try
CopyClientToBitmap(TempBMP,0,0,765,503);
SaveBitmap(TempBMP, Temps);
Except
end;
FreeBitmap(TempBMP);
end;
To Load SMART, just switch SmartSetup in your script with SmartSetupEx using the new parameters, after replacing the SMART.scar with the one posted here and replacing the Embedded_SMART.dll with the one attached.
Usage:
In most scripts, you need to replace something like:
SmartSetup('world2', True, True, False);
wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
If the script you are fixing, already uses SMARTSetupEx, then the easy fix it to just change the trues and falses to how you would like them.
Here are the Parameters: SMARTSetupEx(WorldNum : Integer; Members, Signed, SuperDetail: Boolean);
Here is an example of it being called.
SMARTSetupEx(2, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
The File attached is the new Embedded_SMART.dll. Just unrar it and place it inside the PLUGINS folder in scar. You MUST delete the old one, or move it to a different folder. I take no credit for fixing the .dll, that was Benland. You must restart scar after replacing the Plugin!
Now, to use SMART.
1. Close all open SCAR and SMART windows
2. Reopen a SMART script
3. Run the script, as soon as SMART opens minimize it
4. DO NOT activate SMART until you are done macroing, or SCAR has said it is finished, it will cause it to mess up.
Enjoy.
Cheers!