BenLand100
2012-03-20 12:22:59
This version implements something I put into Simba a long time ago called the Extensible Input/Output System (EIOS). EIOS basically lets you define a target window in a plugin and set it as the target in a script so you can use all of Simba's native methods for color finding, mouse movement, and keyboard interaction. Some of you might say "But, SMART already works this way." to which I would say, yes, it does, however the implementation is a hack that was developed because SCAR was closed source and involves overriding methods (a very pascalscript specific thing) and other dirty. Using EIOS all of this is built into Simba, and makes it easy (well, easier) to implement custom sandboxes (like SMART) for other applications. As an added side effect, this makes core SMART functionality available for lape and thus both 32 and 64 bit versions of linux and windows. In addition, the EIOS method works with pascalscript and any other interpreter you would want to write wrappers for. It's also completely backwards compatible.
It is, as far as I can tell, completely stable, however I'm leaving it as beta and it won't go mainstream until SRL devs have implemented the new SMART loading routine with EIOS (not difficult, see below) and until a version of Simba with some (required) modifications to EIOS is officially released.
[23-03-12]Waiting only for Simba 0.99 to be released before v7.0 is added to the plugin updater. It's fully backwards compatible, but needs that minimum Simba version for the EIOS updates (the only real reason to update) to be usable, at which point SRL devs should switch to the EIOS loading scheme.
If you want to beta test, grab the SMART binaries below (or compile from source in the git repository). MAKE SURE YOU DELETE THE OLD LIBSMART! The new libraries have the arch bit size in their name to prevent ambiguity. You'll need to grab a Simba binary with the modifications I made from (Wizzup's builds) http://nala.villavu.com/downloads/master/2e2062318666e0230a36b24562acddb10b9aa41f/ (or compile it from Wizzup's git repository, master branch). You'll also need to know a bit about the EIOS targeting scheme, which is basically:Note that you don't technically have to load the SMART library, you only have to set the target. IF you want to use other SMART methods, you will still need to load the library in the usual way, but you will
tl;dr New SMART requires a new Simba to take advantage of new functionality allowing SMART to run in lape and on new architectures.
Zipped Binaries (Hosted by GITHub):
https://github.com/downloads/BenLand100/SMART/SMARTv7.0.zip
Source (GIT Repos):
https://github.com/BenLand100/SMART
Changelog v7.0:
[19/03/12]
+ Implemented EIOS
+ Added 64bit build targets
+ Renamed library names to libsmart32.so, libsmart64.so, libsmart32.dll, libsmart64.dll
+ Modified source for full 64bit compatibility
[20/03/12]
+ Added IsMouseButtonDown functionality
+ Tried to fix tab key thing a bit more
[22/03/12]
+ Changed long->int where appropriate for 64bit targets
[23/03/12]
+ Downstream devs confirm stable v7.0beta -> v7.0
[27/03/12]
+ Export bug in windows targets fixed (redownload if you were experiencing problems)
[23-03-12]Waiting only for Simba 0.99 to be released before v7.0 is added to the plugin updater. It's fully backwards compatible, but needs that minimum Simba version for the EIOS updates (the only real reason to update) to be usable, at which point SRL devs should switch to the EIOS loading scheme.
If you want to beta test, grab the SMART binaries below (or compile from source in the git repository). MAKE SURE YOU DELETE THE OLD LIBSMART! The new libraries have the arch bit size in their name to prevent ambiguity. You'll need to grab a Simba binary with the modifications I made from (Wizzup's builds) http://nala.villavu.com/downloads/master/2e2062318666e0230a36b24562acddb10b9aa41f/ (or compile it from Wizzup's git repository, master branch). You'll also need to know a bit about the EIOS targeting scheme, which is basically:Note that you don't technically have to load the SMART library, you only have to set the target. IF you want to use other SMART methods, you will still need to load the library in the usual way, but you will
program EIOSTest;
[LEFT][LEFT][LEFT][LEFT][LEFT][LEFT][LEFT]
procedure InitSmart();
var
version: integer; //version of this record
root, params: string; //Passed to SmartSetup
width, height: integer; //Passed to SmartSetup
initseq: string; //Passed to SmartSetup
maxmem: integer; //Max JVM mem in MB, -1 is default
jvmpath, useragent: string; //'' is the old defaults
begin
version:= 0;
root:= 'http://world15.runescape.com/';
params:= 'plugin.js?param=o0,a1,m0';
width:= 765;
height:= 503;
initseq:= 's';
maxmem:= -1; //use SMART's default
jvmpath:= ''; //use SMART's default
useragent:= ''; //use SMART's default
SetEIOSTarget('libsmart',IntToStr(version)+',"'+root+'","'+params+'",'+IntToStr(width)+','+IntToStr(height)+',"'+initseq+'",'+IntToStr(maxmem)+',"'+jvmpath+'","'+useragent+'"');
end;
begin
InitSmart();
//Now, all of Simba's functions use SMART as the target, no hacks.
while true do
begin
MoveMouse(Random(765),Random(503));
Wait(1000);
end;
end.[/LEFT]
[/LEFT]
[/LEFT]
[/LEFT]
[/LEFT]
[/LEFT]
[/LEFT]
NOT have to call SmartSetup or include Smart.simba (which is the part that overrides methods to intercept I/O). SetEIOSTarget replaces the call to SmartSetup. Granted, you will have to call SetEIOSTarget before you interact with SMART just as you had to call SmartSetup before interacting with SMART. tl;dr New SMART requires a new Simba to take advantage of new functionality allowing SMART to run in lape and on new architectures.
Zipped Binaries (Hosted by GITHub):
https://github.com/downloads/BenLand100/SMART/SMARTv7.0.zip
Source (GIT Repos):
https://github.com/BenLand100/SMART
Changelog v7.0:
[19/03/12]
+ Implemented EIOS
+ Added 64bit build targets
+ Renamed library names to libsmart32.so, libsmart64.so, libsmart32.dll, libsmart64.dll
+ Modified source for full 64bit compatibility
[20/03/12]
+ Added IsMouseButtonDown functionality
+ Tried to fix tab key thing a bit more
[22/03/12]
+ Changed long->int where appropriate for 64bit targets
[23/03/12]
+ Downstream devs confirm stable v7.0beta -> v7.0
[27/03/12]
+ Export bug in windows targets fixed (redownload if you were experiencing problems)
