The Killer
2013-09-06 18:07:42
I'v tried changing paths and deleting cache but I can't use opengl with smart 8.2, demise's includes and simba v1.00
I can use it with the browser.
I can use it with the browser.
2013-09-06 18:07:42
2013-09-06 18:25:18
2013-09-06 18:30:44
From: BMWxi
More details might be useful.
When a SMART pops up, what happens? Does it close automatically or does it load in Safemode?
If it manages to load, is there an OpenGL option? If so, does the SMART client close when you switch to it?
2013-09-06 18:39:09
From: The Killer
it manages to loads, goes to the auto setup screen. I hit autosetup and it goes to safemode with med settings. The opengl option is there btu when I click it, it says it could not enter it
2013-09-06 18:41:29
From: BMWxi
Did you make sure that you removed all of your pid files and other things?
2013-09-06 20:46:50
SmartSpawnClient(GetJavaPath(False), Replace(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], Width, Height, InitSequence, '', '', Implode(',', Plugins));
Function GetJavaPath(Console: Boolean): String;
var
Drive: String;
CurrentPath: String;
Begin
Drive := Copy(PluginPath, 0, 3);
If (FindDirectory('Program\sFiles\s\(x86\)', Drive)) Then
Begin
CurrentPath := Drive + 'Program Files (x86)\';
End Else
CurrentPath := Drive + 'Program Files\';
If (FindDirectory('Java|java', CurrentPath + '\')) Then
Begin
CurrentPath := CurrentPath + 'Java\';
End Else
Begin
Writeln('Failed To Find Path: ' + CurrentPath + 'Java\');
Exit;
End;
Drive := GetDirectoryName('jre', CurrentPath);
If (Length(Drive) > 0) Then
Begin
If (Console) Then
CurrentPath := CurrentPath + Drive + '\bin\java.exe'
Else
CurrentPath := CurrentPath + Drive + '\bin\javaw.exe';
End Else
Begin
Drive := GetDirectoryName('jdk', CurrentPath);
If (Console) Then
CurrentPath := CurrentPath + Drive + 'jre\bin\java.exe'
Else
CurrentPath := CurrentPath + Drive + 'jre\bin\javaw.exe';
End;
If (FileExists(CurrentPath)) Then
Result := CurrentPath
Else
writeln('Failed To Find Java.exe or Javaw.exe. Please add ~\JRE\Bin to your PATH environment variable.');
End;
2013-09-07 16:19:01
From: Brandon
Get her to update her Smart and include I guess.. With Smart 8.3, it can automatically enter OpenGL mode.. Sorta..
2013-09-07 17:25:27
2013-09-07 17:30:36
Self.__Target := SmartSpawnClient('C:/Program Files/Java/jdk1.7.0_25/jre/bin/javaw.exe', Replace(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], Width, Height, InitSequence, '', '', Implode(',', Plugins));
2013-09-07 18:25:04
From: DemiseScythe
If you uninstall all the unneeded Java versions, 8.2 works fine.
Get rid of all 64bit and Jdks and it should work after deleting the preference files.
From: CRU1Z1N
After deleting the preference files and downloading and compiling the latest smart 8.2 and altering the smart loading function with my own jvm path it work perfect
line 46 in glx/smart.simbaSelf.__Target := SmartSpawnClient('C:/Program Files/Java/jdk1.7.0_25/jre/bin/javaw.exe', Replace(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], Width, Height, InitSequence, '', '', Implode(',', Plugins));
2013-09-08 00:01:01
From: Brandon
Get her to update her Smart and include I guess.. With Smart 8.3, it can automatically enter OpenGL mode.. Sorta..
2013-09-08 13:08:47
2013-09-08 14:51:43
From: The Killer
Update: Demise's method didn't work :/
Trying to setup with @brandon@ 's stuff but I don't know what to include and what I need to put in my mainloop to get smart to spawn :/ - Thanks for all the help so far
{$DEFINE SMART} //If using SMART v8.2 or lower then {$DEFINE SMART8API}
{$I GLX/Setup.Simba}
var
Smart: TSmart;
begin
SetupGLX(Smart, 1360, 670); //Width, Height of Smart.
end.
2013-09-08 15:46:23
From: Brandon
{$DEFINE SMART} //If using SMART v8.2 or lower then {$DEFINE SMART8API}
{$I GLX/Setup.Simba}
var
Smart: TSmart;
begin
SetupGLX(Smart, 1360, 670); //Width, Height of Smart.
end.
Should use Smart v8.3 tbh. Nothing special required. No need for path variables or anything..
2013-09-08 17:13:58
2013-09-09 17:38:56
From: CRU1Z1N
when ever i have any problems i usually uninstall everything then re-download and compile newest sources from all corresponding GIT repos.
Glad your up and running tho and thanks for the rep :D.
code so far (playing with it to try and get some results): {$DEFINE SMART8} //If using SMART v8.2 or lower then {$DEFINE SMART8API}
{$I GLX/Setup.Simba}
var
Smart: TSmart;
Textgl: glCharArray;
Text: TStringArray;
i, a: Integer;
begin
SetupGLX(Smart, 800, 600); //Width, Height of Smart. should change these
// GLXMapHooks(T.CurrentClient);
glDebug(GL_MODE_Fonts, 0, 7, 71, 651, 536);
Textgl := glGetChars(IntToBox(7, 71, 651, 536));
a := glGetCharSpacing(Textgl);
Text := glCharsToText(Textgl, a);
for i := Low(Text) to High(Text) do
Writeln(Text[i]);
Writeln(glCharsToTexts(glGetChars(IntToBox(7, 71, 651, 536))));
// Writeln(glGetTextures(IntToBox(7, 71, 651, 536)));
Writeln(glGetChars(IntToBox(7, 71, 651, 536)));
end. output:Paired with SMART[7388]
[{TEXT =
[{TEXTUREID = 16, COLOUR = 551, X = 114, Y = 1095761920, LETTER =
Successfully executed.
The following bitmaps were not freed: [0]Thanks in advance, sorry for my noobiness, lape and opengl is completely new to me tbh and the noobiness is spread between @Sjoe and I since this is a project we're doing together :/
2013-09-09 17:42:25
2013-09-09 17:44:05
From: Sjoe
I'm have nothing to do with this
2013-09-09 17:48:50
2013-09-09 17:55:41
From: DemiseScythe
What you both doing?
Also, you playing too small. Try 1350 by 670 pixels for a more playable setup.
2013-09-09 18:00:52
From: Sjoe
We just wanna grab the text in the chat. but debug isn't really showing any text :p
function VTaskComplete: Boolean;
var
I: Integer;
T: TStringArray;
begin
T := glCharsToText(glGetChars(IntToBox(x1, y1, x2, y2)));
for I := 1 to High(T) do
begin
if (Between('Return to a ', '.', T[I]) = 'Slayer Master') then
begin
Result := True;
Exit;
end;
end;
end; 2013-09-09 18:02:57
From: DemiseScythe
Debug for the text is pretty much useless, just search for text and do stuff to it.
The text functions work regardless of position unlike RS2 SRL.
Type "Slayer Master" into chatbox, change x1, y1, x2, y2 to chatbox bounds and run Writeln(VTaskComplete); and it should print True meaning it found the text.function VTaskComplete: Boolean;
var
I: Integer;
T, P: TStringArray;
begin
T := glCharsToText(glGetChars(IntToBox(x1, y1, x2, y2)));
for I := 1 to High(T) do
begin
if (Between('Return to a ', '.', T[I]) = 'Slayer Master') then
begin
Result := True;
Exit;
end;
end;
end;
Modify to fit what you want.
2013-09-11 12:44:25
From: DemiseScythe
Debug for the text is pretty much useless, just search for text and do stuff to it.
The text functions work regardless of position unlike RS2 SRL.
Type "Return to a Slayer Master." into chatbox, change x1, y1, x2, y2 to chatbox bounds and run Writeln(VTaskComplete); and it should print True meaning it found the text.function VTaskComplete: Boolean;
var
I: Integer;
T: TStringArray;
begin
T := glCharsToText(glGetChars(IntToBox(x1, y1, x2, y2)));
for I := 1 to High(T) do
begin
if (Between('Return to a ', '.', T[I]) = 'Slayer Master') then
begin
Result := True;
Exit;
end;
end;
end;
Modify to fit what you want.
[{TEXT =
[{TEXTUREID = 0, COLOUR = 318, X = 211, Y = 82, LETTER =
n
a
s
P
k
p
g
c
p
a
R
M
g
7 l
l
1 x
!
d e
t
i
t
a
r
r
R
M
k
[
x
: 6 1 A
, 3 :
[
n
]
r
P
a
?
?
e
:
f
l
: 0 0 2 A
1
P
k
S
h
c
u
m
a
m
e
7 i
[ 0 ]
R
!
s
R
M
g
i
h
m
t
c
i
2
P
k
M
:
n
m
) a
f
P
k
K
?
:
o
0
R
M
e n
o
r a
k
5 ] m
R
M
g
i
d
a
y
a
P
k
K
?
:
s
t
s
o
e
o
h
g
b
?
?
?
e
0 (
(
) e
?
?
n
3 l
l
[ a
e e
e
c
s
n
2
a
v
c
R
M
g
7 o
?
?
n
r
o
t
e
t
n
y
l
e
c
[
n
]
2 R
v
?
?
n
3 c
[
n
]
y
:
n
l
o
s
R
s C
, - = s
e
h
n
P
k
P
t n
o
r a
k
5 ] m
e
1 l
-
'
_
M
' "
r
p
9
k
2 ?
_
0
'
'
4 l e
_
7
c
3 l
-
'
_
M
' "
r
p
c
e
1 l
-
'
_
M
' "
r
p
t
e
1 l
-
'
_
M
' "
r
p
G
a
: l
" '
- = $
m
s
i
.
'
M 0
.
l
p
s
a
8 m
.
M 0
.
l
b
r
t s
"
_ ,
1 3 e
m
i
-
e
- _
r
p
p
p
2
k
2 ?
_
0
'
'
4 l e
_
s
, - = s
e
n
False
Successfully executed.
The following bitmaps were not freed: [0]
:/function VTaskComplete: Boolean;
var
I: Integer;
T: TStringArray;
begin
T := glCharsToText(glGetChars(IntToBox(7, 71, 651, 536)));
for I := 1 to High(T) do
begin
Writeln(T[I]);
if (Between('Return to a ', '.', T[I]) = 'Slayer Master') then
begin
Result := True;
Writeln('Found mr master');
Exit;
end;
end;
end;
2013-09-11 20:02:40
From: The Killer
:/[{TEXT =
[{TEXTUREID = 0, COLOUR = 318, X = 211, Y = 82, LETTER =
n
False
Successfully executed.
The following bitmaps were not freed: [0]
code:function VTaskComplete: Boolean;
var
I: Integer;
T: TStringArray;
begin
T := glCharsToText(glGetChars(IntToBox(7, 71, 651, 536)));
for I := 1 to High(T) do
begin
Writeln(T[I]);
if (Between('Return to a ', '.', T[I]) = 'Slayer Master') then
begin
Result := True;
Writeln('Found mr master');
Exit;
end;
end;
end;
2013-09-11 21:16:42
From: DemiseScythe
Would help to at least get a picture of the text you are trying to recognize but as I see it, your problem is the spacing between the lines. Max spacing param is too high causing Simba to interpret say the word Cake as 4 words C, a, k, and e.
glCharsToText(glGetChars(IntToBox(......)), HorizontalSpacing, VerticalSpacing);
glGetCharSpacing(glCharsHere); //Can also be used to determine how much space to use for SRL's Colour OCR.
2013-09-12 07:33:16
From: Brandon
…
program new;
{$DEFINE SMART}
{$I GLX/Setup.Simba}
var
Smart: TSmart;
Area:TBox;
function GLIsTextEx(TB: TBox; Text: string): Boolean;
var
Found: glTextExArray;
begin
Result := False;
Found := glCharsToTextEx(glGetChars(IntToBox(TB.X1,TB.Y1,TB.X2,TB.Y2)));
Writeln(Found[0].Text[0]); //print found text
if Found[0].Text[0] = Text then
begin
Result := True;
Writeln('Found');
end else Writeln('Not Found');
end;
begin
SetupGLX(Smart, 1360, 670);
glDebug(3, 0, 0, 0, Smart.Height, Smart.Width);
Area := IntToBox(0, 0, 152, 20);//GL_ChatBounds;
GLIsTextEx(Area,'Da ');
end.