bonsai
2014-08-25 17:02:05
Is it possible to set things up so the user drives the keyboard and mouse but a script can still query the screen and display (smartImage)?
2014-08-25 17:02:05
2014-08-25 18:20:27
From: bonsai
Is it possible to set things up so the user drives the keyboard and mouse but a script can still query the screen and display (smartImage)?
2014-08-25 21:06:03
2014-08-25 23:14:24
2014-08-26 10:01:39
From: Brandon
It will not be possible in safe-mode (aka OSRS) without target selection.. at all.
Why? https://github.com/BenLand100/SMART/blob/master/src/Client.java#L357

2014-08-26 11:41:35
From: bonsai
Do I do this with targeting functions?
The disable button blocks the script, doesn't it?
2014-08-26 12:10:33
From: Brandon
The disable button does nothing for OpenGL or Direct-X atm.. The reason is because it still captures. The only thing it does is stop both plugins from drawing on SMART's debug. It is "supposed" to stop feeding SMART/Simba pixels but it doesn't stop for the current releases.
@riwu; that will work. It still nullifies the event-nazi and so.. SMART's mouse and other functions will stop working. However, OP only asked for capturing to work so it is more than suitable for what they are trying to do..
While it is nice to have this as a "feature", it does defeat the purpose of the "enable" button really.. I'd love to leave it as a feature but I'd like to leave SMART working how Benland100 intended it to work. Will be leaving it how it is now but it MIGHT be changed to the intended state in future releases.
It's basically like using the official RS client with just drawing enabled. At least, that's what I thought OP wanted? (Btw.. this is also already possible with both plugins)
2014-08-26 13:12:57
2014-08-26 16:55:19
program bwRunescape;
{$DEFINE SMART}
{$include_once srl-6/srl.simba}
var
orig, copy, bw, bwcopy, w, h: integer;
begin
smartPlugins := ['d3d9.dll'];
smartEnableDrawing := true;
SetupSRL();
getclientdimensions(w, h);
while (true) do
begin
orig := bitmapfromclient(0, 0, w-1, h-1);
copy := copybitmap(orig);
bw := greyscalebitmap(copy);
smartImage.drawbitmap(bw, point(0, 0));
freebitmaps([orig, copy, bw]);
end;
end.
2014-08-28 20:03:00
From: bonsai
Yeah, I don't know why I was so sure it didn't work. I thought that disable button broke everything.
Anyway, thanks for the patience. Now I can play runescape in black and white! :spot:
2014-08-28 22:16:20
From: bonsai
Yeah, I don't know why I was so sure it didn't work. I thought that disable button broke everything.
Anyway, thanks for the patience. Now I can play runescape in black and white! :spot:program bwRunescape;
{$DEFINE SMART}
{$include_once srl-6/srl.simba}
var
orig, copy, bw, bwcopy, w, h: integer;
begin
smartPlugins := ['d3d9.dll'];
smartEnableDrawing := true;
SetupSRL();
getclientdimensions(w, h);
while (true) do
begin
orig := bitmapfromclient(0, 0, w-1, h-1);
copy := copybitmap(orig);
bw := greyscalebitmap(copy);
smartImage.drawbitmap(bw, point(0, 0));
freebitmaps([orig, copy, bw]);
end;
end.
SmartSetEnabled(__smartCurrentTarget, false);