SRL Archive - Development

Simba Future Plans


Wizzup?

2011-02-04 18:45:34

So, to summarize all the recent ideas and threads about Simba development, I made a small HTML page: http://wizzup.org/simba_plan.html

I'm really not going to post it here again, just a quick list:

  • Script Manager.
  • Documentation format / style.
  • Out of the process plugins / scripts: What route do we take?
  • Python Integration.

Now, the Script Manager is really quite done, except for a pretty interface to it. After we have some sort of interface, we can release a alpha of it. (And once it's stable, we'll release Simba 1.0 :D )
If anyone likes to work on it, let us know.

The more important parts are I suppose the Out of the process plugins / MML Daemon / libMML parts. I'm unsure how quickly they can be totally realized, although I believe some of the points (like moving the interpreters to DLLs) shouldn't be too hard. (Which is also one of the first points)

Oh, and did I say that Simba 0.96 is coming out soon? ( I probably did several times, but that was a few weeks ago. :p )

~Wizz

i luffs yeww

2011-02-04 19:35:31

From: Wizzup?
blahblahblah

  • blahblahblah
  • Python Integration.

blahblahblah

~Wizz


Yes.

Frement

2011-02-04 19:39:19

I must say, awesome job, and awesome program! Awesome team! Everything is just so awesome! Can't wait for the MML Daemon.

Flight

2011-02-04 19:51:14

This might be a pretty simple request for you (or just perhaps something you don't plan on including at all) but what about silent mouse / keyboard functions?

Anyways, it looks pretty nice, would the Script Manager have anything to do with SRL Stats?

Echo_

2011-02-04 19:51:47

Python scripting sounds great, it would really be a big step forward for the scripting community as it opens doors for people who are more familiar with Python rather than Pascal. Can' t wait to see the script manager as well.

i luffs yeww

2011-02-04 19:57:41

From: Flight
This might be a pretty simple request for you (or just perhaps something you don't plan on including at all) but what about silent mouse / keyboard functions?

Anyways, it looks pretty nice, would the Script Manager have anything to do with SRL Stats?


Just in case you were wondering, silent mouse is detectable so it was removed. I don't know if it's actually possible with Simba because of how it runs, but with some changes it may be. No real point imo, though.

From: Echo_
Python scripting sounds great, it would really be a big step forward for the scripting community as it opens doors for people who are more familiar with Python rather than Pascal. Can' t wait to see the script manager as well.


If you know python you can always help. ;) We (Wizzup?) have to get libmml done because nobody (me) does anything to help anymore, but after that it's all python. libmml is easy stuff though.

Flight

2011-02-04 20:16:06

From: i luffs yeww
Just in case you were wondering, silent mouse is detectable so it was removed. I don't know if it's actually possible with Simba because of how it runs, but with some changes it may be. No real point imo, though.


Not everyone bots on Runescape, mate.

i luffs yeww

2011-02-04 20:20:04

I know, I'm one of them. But I still see no point to silent mouse..

(Not saying there isn't any - enlighten me if you can, but until then, I dunno what else to say.)

bevardis

2011-02-05 04:05:57

From: i luffs yeww
Yes.


Yes.


Edit:

Not meant to be spam. Just hope there will be some python developers and also am waiting for this.

**BANNED The Man

2011-02-05 05:12:03

From: i luffs yeww
Yes.


This.

i luffs yeww

2011-02-05 05:56:52

From: bevardis
Yes.


Edit:

Not meant to be spam. Just hope there will be some python developers and also am waiting for this.


If you know python you can contribute. :) Not much as of now, really, unless you want to just port libmml, but anything helps really.

KingKong

2011-02-05 06:09:27

I know how to code in python, but i have no clue what this porting thing is, if itsn't too hard mind telling me the basics?

i luffs yeww

2011-02-05 06:23:21

Porting is, in this case at least, simply going from one language to another. For this, it's just going from Pascal to Python. It's pretty simple. But I (and Wizzup? and anyone who would know the situation) would like to finish libmml completely before working on pymml more. (Of course some work should be done on pymml on the way, testing and what not, but whatever.)

mastaraymond

2011-02-05 06:25:06

Now the actual development and it's complete ;).

Wizzup?

2011-02-05 06:44:24

From: Flight
This might be a pretty simple request for you (or just perhaps something you don't plan on including at all) but what about silent mouse / keyboard functions?

Anyways, it looks pretty nice, would the Script Manager have anything to do with SRL Stats?


Well, technically this is quite possible. I've actually done it (partly manually, partly programmed) on Linux/X11. Don't know how to do it on Windows, though. (If Windows can do it properly)

mastaraymond

2011-02-05 06:56:58

From: Wizzup?
Well, technically this is quite possible. I've actually done it (partly manually, partly programmed) on Linux/X11. Don't know how to do it on Windows, though. (If Windows can do it properly)

One can send fake events to a window through the API, however many "sophisticated" applications somehow manage to see that this even is fake.. (It won't work on Runescape and Flash(?))

i luffs yeww

2011-02-05 07:00:17

Actually I just "tested" the silent mouse Wizzup? was talking about and it would be worth working on if it worked on runescape. Too tired right now to see if it works. :< But I'm sure Wizzup? already knows so whatever.

Wizzup?

2011-02-05 07:01:39

From: i luffs yeww
Actually I just "tested" the silent mouse Wizzup? was talking about and it would be worth working on if it worked on runescape. Too tired right now to see if it works. :< But I'm sure Wizzup? already knows so whatever.


Yeah, it works.

Flight

2011-02-05 10:12:22

This is what I dug up on Freddy's site, but again this is code for Scar so as far as it goes to make it Simba-compatible, I dunno.

program Silent;

function PostMessage(Wnd: HWND; Msg: Cardinal; LParam, WParam: Integer): LongBool; external 'PostMessageW@user32.dll stdcall';
function SendMessage(Wnd: HWND; Msg: Cardinal; LParam, WParam: Integer): LongBool; external 'SendMessageW@user32.dll stdcall';

const
WM_KEYDOWN = 256;
WM_KEYUP = 257;

WM_MOUSEMOVE = 512;
WM_LBUTTONDOWN = 513;
WM_LBUTTONUP = 514;
WM_RBUTTONDOWN = 516;
WM_RBUTTONUP = 517;

MK_LBUTTON = 1;
MK_RBUTTON = 2;

function MakeLong(A, B: Word): LongInt;
begin
Result := Integer(A) or Integer(B) shl 16;
end;

procedure _Silent_KeyDown(const Target: HWND; const Key: Byte);
begin
if (Target > 0) then
PostMessage(Target, WM_KEYDOWN, Key, 0);
end;

procedure _Silent_KeyUp(const Target: HWND; const Key: Byte);
begin
if (Target > 0) then
PostMessage(Target, WM_KEYUP, Key, 0);
end;

procedure _Silent_MoveMouse(const Target: HWND; const x, y:Integer);
begin
if (Target > 0) then
SendMessage(Target, WM_MOUSEMOVE, 0, MakeLong(x, y));
end;

procedure _Silent_HoldMouse(const Target: HWND; const x, y: Integer; const Left: Boolean);
begin
if (Target > 0) then
if Left then
SendMessage(Target, WM_LBUTTONDOWN, MK_LBUTTON, MakeLong(x, y))
else
SendMessage(Target, WM_RBUTTONDOWN, MK_RBUTTON, MakeLong(x, y));
end;

procedure _Silent_ReleaseMouse(const Target: HWND; const x, y: Integer; const Left: Boolean);
begin
if (Target > 0) then
if Left then
SendMessage(Target, WM_LBUTTONUP, 0, MakeLong(x, y))
else
SendMessage(Target, WM_RBUTTONUP, 0, MakeLong(x, y));
end;

procedure Silent_KeyDown(const Key: Byte);
begin
_Silent_KeyDown(GetClientWindowHandle, Key);
end;

procedure Silent_KeyUp(const Key: Byte);
begin
_Silent_KeyUp(GetClientWindowHandle, Key);
end;

procedure Silent_MoveMouse(const x, y: Integer);
begin
_Silent_MoveMouse(GetClientWindowHandle, x, y);
end;

procedure Silent_HoldMouse(const x, y: Integer; const Left: Boolean);
begin
_Silent_HoldMouse(GetClientWindowHandle, x, y, Left);
end;

procedure Silent_ReleaseMouse(const x, y: Integer; const Left: Boolean);
begin
_Silent_ReleaseMouse(GetClientWindowHandle, x, y, Left);
end;

var
i, ii: Integer;
begin
for i := 50 to 150 do
for ii := 50 to 150 do
if ((i mod 10) = 0) or ((ii mod 10) = 0) then
begin
Silent_HoldMouse(i, ii, True);
Silent_ReleaseMouse(i, ii, True);
end;
end.

Maybe someone can find this useful in converting to Simba? I played around with it myself but to no avail.

nielsie95

2011-02-05 10:20:39

From: Flight
This is what I dug up on Freddy's site, but again this is code for Scar so as far as it goes to make it Simba-compatible, I dunno.

Maybe someone can find this useful in converting to Simba? I played around with it myself but to no avail.


That code looks familiar.. :whistling:
It's pretty much the old SCAR silent mouse, so it wont work for RS.

http://freddy1990.com/forums/index.php/topic,4027.0.html

mastaraymond

2011-02-05 10:21:38

From: Flight
This is what I dug up on Freddy's site, but again this is code for Scar so as far as it goes to make it Simba-compatible, I dunno.

program Silent;

function PostMessage(Wnd: HWND; Msg: Cardinal; LParam, WParam: Integer): LongBool; external 'PostMessageW@user32.dll stdcall';
function SendMessage(Wnd: HWND; Msg: Cardinal; LParam, WParam: Integer): LongBool; external 'SendMessageW@user32.dll stdcall';

const
WM_KEYDOWN = 256;
WM_KEYUP = 257;

WM_MOUSEMOVE = 512;
WM_LBUTTONDOWN = 513;
WM_LBUTTONUP = 514;
WM_RBUTTONDOWN = 516;
WM_RBUTTONUP = 517;

MK_LBUTTON = 1;
MK_RBUTTON = 2;

function MakeLong(A, B: Word): LongInt;
begin
Result := Integer(A) or Integer(B) shl 16;
end;

procedure _Silent_KeyDown(const Target: HWND; const Key: Byte);
begin
if (Target > 0) then
PostMessage(Target, WM_KEYDOWN, Key, 0);
end;

procedure _Silent_KeyUp(const Target: HWND; const Key: Byte);
begin
if (Target > 0) then
PostMessage(Target, WM_KEYUP, Key, 0);
end;

procedure _Silent_MoveMouse(const Target: HWND; const x, y:Integer);
begin
if (Target > 0) then
SendMessage(Target, WM_MOUSEMOVE, 0, MakeLong(x, y));
end;

procedure _Silent_HoldMouse(const Target: HWND; const x, y: Integer; const Left: Boolean);
begin
if (Target > 0) then
if Left then
SendMessage(Target, WM_LBUTTONDOWN, MK_LBUTTON, MakeLong(x, y))
else
SendMessage(Target, WM_RBUTTONDOWN, MK_RBUTTON, MakeLong(x, y));
end;

procedure _Silent_ReleaseMouse(const Target: HWND; const x, y: Integer; const Left: Boolean);
begin
if (Target > 0) then
if Left then
SendMessage(Target, WM_LBUTTONUP, 0, MakeLong(x, y))
else
SendMessage(Target, WM_RBUTTONUP, 0, MakeLong(x, y));
end;

procedure Silent_KeyDown(const Key: Byte);
begin
_Silent_KeyDown(GetClientWindowHandle, Key);
end;

procedure Silent_KeyUp(const Key: Byte);
begin
_Silent_KeyUp(GetClientWindowHandle, Key);
end;

procedure Silent_MoveMouse(const x, y: Integer);
begin
_Silent_MoveMouse(GetClientWindowHandle, x, y);
end;

procedure Silent_HoldMouse(const x, y: Integer; const Left: Boolean);
begin
_Silent_HoldMouse(GetClientWindowHandle, x, y, Left);
end;

procedure Silent_ReleaseMouse(const x, y: Integer; const Left: Boolean);
begin
_Silent_ReleaseMouse(GetClientWindowHandle, x, y, Left);
end;

var
i, ii: Integer;
begin
for i := 50 to 150 do
for ii := 50 to 150 do
if ((i mod 10) = 0) or ((ii mod 10) = 0) then
begin
Silent_HoldMouse(i, ii, True);
Silent_ReleaseMouse(i, ii, True);
end;
end.

Maybe someone can find this useful in converting to Simba? I played around with it myself but to no avail.

Go to settings -> settings -> interpreter -> allowsyscalls and set it to true..

Now: select a window.. You'll see an ID appear in the debug, copy and paste this into the script (for the window constant) and you will see it works.

program Silent;

const window = 4130762;
function PostMessage(Wnd: HWND; Msg: Cardinal; LParam, WParam: Integer): LongBool; external 'PostMessageW@user32.dll stdcall';
function SendMessage(Wnd: HWND; Msg: Cardinal; LParam, WParam: Integer): LongBool; external 'SendMessageW@user32.dll stdcall';

const
WM_KEYDOWN = 256;
WM_KEYUP = 257;

WM_MOUSEMOVE = 512;
WM_LBUTTONDOWN = 513;
WM_LBUTTONUP = 514;
WM_RBUTTONDOWN = 516;
WM_RBUTTONUP = 517;

MK_LBUTTON = 1;
MK_RBUTTON = 2;

function MakeLong(A, B: Word): LongInt;
begin
Result := Integer(A) or Integer(B) shl 16;
end;

procedure _Silent_KeyDown(const Target: HWND; const Key: Byte);
begin
if (Target > 0) then
PostMessage(Target, WM_KEYDOWN, Key, 0);
end;

procedure _Silent_KeyUp(const Target: HWND; const Key: Byte);
begin
if (Target > 0) then
PostMessage(Target, WM_KEYUP, Key, 0);
end;

procedure _Silent_MoveMouse(const Target: HWND; const x, y:Integer);
begin
if (Target > 0) then
SendMessage(Target, WM_MOUSEMOVE, 0, MakeLong(x, y));
end;

procedure _Silent_HoldMouse(const Target: HWND; const x, y: Integer; const Left: Boolean);
begin
if (Target > 0) then
if Left then
SendMessage(Target, WM_LBUTTONDOWN, MK_LBUTTON, MakeLong(x, y))
else
SendMessage(Target, WM_RBUTTONDOWN, MK_RBUTTON, MakeLong(x, y));
end;

procedure _Silent_ReleaseMouse(const Target: HWND; const x, y: Integer; const Left: Boolean);
begin
if (Target > 0) then
if Left then
SendMessage(Target, WM_LBUTTONUP, 0, MakeLong(x, y))
else
SendMessage(Target, WM_RBUTTONUP, 0, MakeLong(x, y));
end;

procedure Silent_KeyDown(const Key: Byte);
begin
_Silent_KeyDown(window, Key);
end;

procedure Silent_KeyUp(const Key: Byte);
begin
_Silent_KeyUp(window, Key);
end;

procedure Silent_MoveMouse(const x, y: Integer);
begin
_Silent_MoveMouse(window, x, y);
end;

procedure Silent_HoldMouse(const x, y: Integer; const Left: Boolean);
begin
_Silent_HoldMouse(window, x, y, Left);
end;

procedure Silent_ReleaseMouse(const x, y: Integer; const Left: Boolean);
begin
_Silent_ReleaseMouse(window, x, y, Left);
end;

var
i, ii: Integer;
begin
Silent_HoldMouse(5,5,false);
Silent_ReleaseMouse(5,5,false);{
for i := 50 to 150 do
for ii := 50 to 150 do
if ((i mod 10) = 0) or ((ii mod 10) = 0) then
begin
Silent_HoldMouse(i, ii, True);
Silent_ReleaseMouse(i, ii, True);
end; }
end.

moparisthebest

2011-02-06 05:15:28

Python should go at the top of the list, simply so that Simba will be usable on other platforms besides win32. I'd like to write some code and cheat on runescape, but I can't stand doing it through wine.

I saw you mention something about moving interpreter support to plugins? Or something along those lines? That would be great, because then I could probably add in python support (because it would allow me to use C/C++). I'm interested in more info on this subject. :)

On that note, I have very painfully set up my auto-build box set up to cross compile for mac osx from linux, so when simba supports python and is usable under osx, I can automatically spit out executables for that as well. :)

Wizzup?

2011-02-06 17:48:19

From: moparisthebest
Python should go at the top of the list, simply so that Simba will be usable on other platforms besides win32. I'd like to write some code and cheat on runescape, but I can't stand doing it through wine.


Most of the points (apart from the Script Manager) were made mainly to get Python support. They're pretty much all a requirement to properly implement Python support. (libMML is, the processes spawner is, the external interpreter is)

From: moparisthebest
I saw you mention something about moving interpreter support to plugins? Or something along those lines? That would be great, because then I could probably add in python support (because it would allow me to use C/C++). I'm interested in more info on this subject. :)


Yes, that would certainly be possible. Although I was planning to implement the Python interpreter in FPC, though. I'm unsure how soon I could whip up a c-like interface to adding interpreters. But it will be done, eventually.

From: moparisthebest
On that note, I have very painfully set up my auto-build box set up to cross compile for mac osx from linux, so when simba supports python and is usable under osx, I can automatically spit out executables for that as well. :)


That is very interesting news. :) I don't have a Mac to write the required os_darwin.pas; but Mac support would be very cool.

i luffs yeww

2011-02-06 17:50:03

I'm with mopar. :3

But, it will take a lot of work and take a bit of time, so yeah.

moparisthebest

2011-02-08 02:23:56

From: Wizzup?

Yes, that would certainly be possible. Although I was planning to implement the Python interpreter in FPC, though. I'm unsure how soon I could whip up a c-like interface to adding interpreters. But it will be done, eventually.


If you made any interface, FPC, C, or otherwise to add interpreters, it would be an easy step to add python or anything else. Do you think that might be done soon-ish? :)

(going off-topic here, but now I'm kind of excited, doing it like this, the possibilities are endless. I'm thinking ruby interpreter, javascript, prolog would be cool and different, etc etc etc, hmm :spot:)

From: Wizzup?
That is very interesting news. :) I don't have a Mac to write the required os_darwin.pas; but Mac support would be very cool.


Well, you said that os_linux.pas only (or mainly?) just uses X calls anyway right? And since OSX also runs an X server, I think it should work with little to no changes, that is what markus did isn't it? I was planning on simply defining LINUX and trying to compile it on OSX that way.

As to owning a mac, I just have an OSx86 release installed on my computer to test programs with, with a little googling you can also install it in VirtualBox under Linux. I certainly would never pay the something like 10x markup on the hardware to actually buy a mac, no one should. :)

Markus

2011-02-08 08:40:58

From: moparisthebest
Well, you said that os_linux.pas only (or mainly?) just uses X calls anyway right? And since OSX also runs an X server, I think it should work with little to no changes, that is what markus did isn't it? I was planning on simply defining LINUX and trying to compile it on OSX that way.


Well, you can start Simba but it doesn't really work. Pascalscript is too buggy to actually run anything and Lazarus at OSX isn't really that mature. It required some nasty hacks to actually get it to compile and besides the GUI nothing really worked :')
I might give it yet another shot if I ever get SL working again at my pc (I just need to fix up chameleon, but cbf).

moparisthebest

2011-02-08 14:30:06

From: Markus
Well, you can start Simba but it doesn't really work. Pascalscript is too buggy to actually run anything and Lazarus at OSX isn't really that mature. It required some nasty hacks to actually get it to compile and besides the GUI nothing really worked :')
I might give it yet another shot if I ever get SL working again at my pc (I just need to fix up chameleon, but cbf).


That sounds like how Simba runs under Linux too. The GUI works, but pascalscript always crashes so you can't run any scripts.

Mind sharing the hacks you made to get it to compile? Perhaps even a diff? It would just make it easier on me when I go to set it up.

Wizzup?

2011-02-09 05:28:32

As far as I know he took os_linux.pas, trimmed it down a lot. (up to the point where it couldn't go a XGetImage). Something which the Linux client can do… ( Also, ever tried the RUTIS interpreter? )

moparisthebest

2011-02-09 05:41:11

I would think all of the calls to X functions would work on OSX as well, unless Apple uses some crazy proprietary X server, which I somehow wouldn't doubt.

As to RUTIS, I believe I have tried it before and it didn't even get as far as pascalscript did. Pascalscript will run some simple operations sometimes, but forget about heavy math or anything to do with arrays.

I think I've said this before, but we need some test cases to run so that we know what works and what doesn't, under what conditions. This way we know right away when there is a regression, or when something is fixed. I could even run many of them automatically when they are built. Any takers? :)

grats

2011-02-09 05:52:56

From: moparisthebest
I would think all of the calls to X functions would work on OSX as well, unless Apple uses some crazy proprietary X server, which I somehow wouldn't doubt.

As to RUTIS, I believe I have tried it before and it didn't even get as far as pascalscript did. Pascalscript will run some simple operations sometimes, but forget about heavy math or anything to do with arrays.

I think I've said this before, but we need some test cases to run so that we know what works and what doesn't, under what conditions. This way we know right away when there is a regression, or when something is fixed. I could even run many of them automatically when they are built. Any takers? :)


You need tests done!? pick me!!

what exactly do you need on these test cases with different conditions and stuff?

I can setup a virtual machine for windows xp/vista/w7 with any specs you want.. on multiple pc's I also have 2 macs running os x if you need those to test stuff on, you're free to remote connect

moparisthebest

2011-02-09 06:08:59

I was saying Simba needs tests written, I can automate the runs and reporting with the same system that automatically builds Simba on every commit. :)

grats

2011-02-09 06:10:32

From: moparisthebest
I was saying Simba need tests written, I can automate the runs and reporting with the same system that automatically builds Simba on every commit. :)


ah, I saw wizzup? talking about running stuff on OS X but he doesn't have os x to test with so I figured you were talking about the same thing :frusty:

Wizzup?

2011-02-09 06:57:15

What kind of tests are you referring to? MML integrity tests?

moparisthebest

2011-02-09 16:30:02

From: Wizzup?
What kind of tests are you referring to? MML integrity tests?


That would be good too, but I was talking about tests to verify that the scripting engine, mouse movement, keyboard, color grabbing, perhaps bitmap/dtm manipulation and the like. By running certain test cases inside Simba that can be ran and written to a log file we can use that to automatically verify correctness.