SRL Archive - S.M.A.R.T.

SMARTv6.5b


BenLand100

2010-12-29 22:20:32

Added v6.5b to the srl-opendev, mirrored on my server:
Recent SCAR: http://bland.no-ip.org/files/Embedded_SMART.dll
Linux: http://bland.no-ip.org/files/libsmart.so
Windows: http://bland.no-ip.org/files/libsmart.dll

Source (SVN Repos):
http://blanddns.no-ip.org:81/repos/public-smart

Changelog v6.5:
+ FIXED KeyEvent passthrough while blocking, should be no more major bugs
+ ADDED procedure SmartSetJVMPath(path: String); which, if desired, should be called BEFORE SmartSetup to get SMART to load a specific JVM binary (particularly useful on Linux). If the binary fails to load, SMART will attempt to load the default binaries. Check the debug output for more info on what it actually loaded.
+ SmartSetTansparentColor => SmartSetTransparentColor, notice the spelling.
+ Converted all exported methods to CDECL and wrote STDCALL wrappers for SCAR/Simba
+ Fixed for SCAR, should compile and register fine now.
+ Wrote python bindings for SMART (Will make a thread on this shortly)
+ Removed casting of void* to long everywhere I noticed it, so should be a bit more x64 compatible (n.b. the libsmart.def file might need to be modified slightly for x64, specifically related to reflection methods)

Changelog v6.5a:
+ Modified the Hold/Release key methods to be able to type all printable characters, provided you give the correct character code and shift state

Changelog v6.5b:
+ Useragent for all webpage getting operations (I believe it's right, I'll let moparisthebest confirm it)
+ For the keyup/down methods, I did my best to map windows VK_[key] codes to Java codes, so it should now type all chars/symbols correctly. If you experience problems, tell me the VK_[key] number and what it should be typing.
+ Folded SCAR exports back into the regular exports (no change should be noticed on the user end)
+ Tweaked the type-through a bit, and added debug output. If you experience problems, tell me what it should have been doing, and give me the command line debug stuff for that time period.

lordsaturn

2010-12-30 01:51:06

jg :) thanks

moparisthebest

2010-12-31 02:05:07

Great to hear about the function setting the JVM path, good work. Looks like it compiled fine for all the platforms simba targets, of course we have to wait and see if it actually works this time for win64, as before someone needs to test it for me, you can grab the latest simba + latest smart from here:
http://www.moparisthebest.com/downloads/simba/current/Simba.x86_64-win64.2010-12-26_13_52.7z

Also, @benland, did you read:
http://villavu.com/forum/showthread.php?p=763792#post763792
Freddy basically said you can remove all those nasty SCAR ifdefs, since SCAR and Simba should now be able to use the same plugin again. Which would substantially clean up the code. :)

Shuttleu

2010-12-31 03:05:28

From: moparisthebest
Great to hear about the function setting the JVM path, good work. Looks like it compiled fine for all the platforms simba targets, of course we have to wait and see if it actually works this time for win64, as before someone needs to test it for me, you can grab the latest simba + latest smart from here:
http://www.moparisthebest.com/downloads/simba/current/Simba.x86_64-win64.2010-12-26_13_52.7z

Also, @benland, did you read:
http://villavu.com/forum/showthread.php?p=763792#post763792
Freddy basically said you can remove all those nasty SCAR ifdefs, since SCAR and Simba should now be able to use the same plugin again. Which would substantially clean up the code. :)


im testing for you

~shut

EDIT: running this
program new;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}
{$i reflection/reflection.simba}

begin
SetupSRL;
SetupReflectionEx(False);
end.
gives me this
[Hint] C:\Users\Thomas\Desktop\simba\Includes\reflection\./Core/Antirandoms\Forester.simba(100:3): Variable 'B' never used at line 99
Compiled succesfully in 1170 ms.
Error: Exception: Access violation at line 346

moparisthebest

2010-12-31 09:25:33

From: Shuttleu
im testing for you

~shut

EDIT: running this
program new;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}
{$i reflection/reflection.simba}

begin
SetupSRL;
SetupReflectionEx(False);
end.
gives me this
[Hint] C:\Users\Thomas\Desktop\simba\Includes\reflection\./Core/Antirandoms\Forester.simba(100:3): Variable 'B' never used at line 99
Compiled succesfully in 1170 ms.
Error: Exception: Access violation at line 346


That's more likely a pascalscript error than a SMART one, can you run it without including SRL? Instead, only import libsmart.dll and see what happens, maybe even try to run SetupSMART. (make sure you have 64-bit java)

Hobbit

2010-12-31 13:44:02

Type through doesn't work for me. Ill type and nothing will show up, I cycle enabling/disabling thinking maybe its in a buffer or something and still nothing. But when I stop a script and restart/start another one it will appears in which ever text box is selected, usually username box @ login

Wizzup?

2011-01-01 07:19:40

Interested in the python bindings! Did you upload these to srl-opendev? I'll make a new plugins release for Simba then.

Wizzup?

2011-01-01 19:10:00

Uploaded as new plugin set. Let us know if it works! :)

BenLand100

2011-01-01 19:16:46

From: moparisthebest
That's more likely a pascalscript error than a SMART one, can you run it without including SRL? Instead, only import libsmart.dll and see what happens, maybe even try to run SetupSMART. (make sure you have 64-bit java)

AFAIK the 64 bit gnu c[++] compilers simply *can't* compile stdcall methods. (this is second hand information, but the source (wizzup) is fairly reliable), so the loader in Simba needs to be modified to NOT attempt to call methods with the stdcall, and rather use cdecl. For clarity, I believe it would be advisable to make another set of functions (GetFunctionCount and GetFunctionInfo or whatever) to export cdecl functions to Pascal, so that it won't be ambiguous from one arch to the other.

Also, I'm of a right mind to just take out the if-defs and leave the SCAR section in the makefile. I have a feeling SIMBA will be diverging from SCAR a bit more soon anyway, and IceFire would go apeshit if i stopped supporting SCAR and I just don't want to deal with it! :)

@Hobbit catch me on IRC

Wanted

2011-01-02 02:24:37

From: BenLand100
I have a feeling SIMBA will be diverging from SCAR a bit more soon anyway, and IceFire would go apeshit if i stopped supporting SCAR and I just don't want to deal with it! :)


Playing stupid must be a fun way of trying to troll me.

I really don't care if you stop supporting SCAR compatibility. Just don't change the SMART file in the repository to one that doesn't work if there is one that works.

BenLand100

2011-01-02 02:44:24

It's not so much fun as it is effective, seeings as you always take it so seriously. ;) But yea, I have no plans to stop supporting Scar, it'd be cool if it could use strings again though.

Nava2

2011-01-04 14:36:22

Just curious, what happened to the Python bindings? I know they are written.. but where? :p

Wizzup?

2011-01-04 14:47:45

http://villavu.com/forum/showthread.php?p=765134#post765134

BenLand100

2011-01-06 21:08:21

v6.5 -> v6.5a
slight modifications

Hobbit

2011-01-06 21:09:21

Does type through work on windows? :p

BenLand100

2011-01-06 21:10:42

I don't know why it doesn't work… It works fine for me, I don't have a windows box to test on

Wanted

2011-01-06 21:31:46

Nvm it works, my comp was screwing up.

Nava2

2011-01-06 21:51:11


Thanks, Ben! :)

BenLand100

2011-01-06 21:56:32

Nice background IceFire908. By the way, that's not a SMART bug.

Wanted

2011-01-06 21:58:29

Nvm, it works :)

BenLand100

2011-01-06 22:00:05

And not only was it not a SMART bug, it was an enormous off-topic spam. I hope you enjoy the reputation you're creating for yourself.
E: LOL NICE JOB DELETING IT TO NOT LOOK RETARDED

E: Nice job derepping me for this post, IceFire908. You have proven beyond a shadow of a doubt that you are the most foolishly retarded person I know. Derepping someone for calling you out for stupidity that you deleted? Seriously? lol.

Wanted

2011-01-06 22:02:08

From: BenLand100
And not only was it not a SMART bug, it was an enormous off-topic spam. I hope you enjoy the reputation you're creating for yourself.
E: LOL NICE JOB DELETING IT TO NOT LOOK RETARDED


What?

Hobbit

2011-01-06 22:04:49

It keeps doing random '&' by itself now…

BenLand100

2011-01-06 22:22:49

If anyone can figure out what's up with the typing, +1 internets to you. Its somewhere in src/smart/EventNazi.java or the initFrame method in src/smart/Client.java

At this point, since EVERYONE is getting random different quirks, I'm going to assume I am drunk/high/asleep/dying and my mind is slowly shutting down while I'm unconsciously conscious and the world is making less and less sense.

Cheers!

BenLand100

2011-01-08 00:40:29

6.5a -> 6.5b
See first post.

moparisthebest

2011-01-08 06:00:28

From: BenLand100

+ Useragent for all webpage getting operations (I believe it's right, I'll let moparisthebest confirm it)


It looks like you maybe didn't commit that part? The only user-agent is the one set for the jar request (which is correct), you'd also want to set a firefox or similar one in the 'downloadHTML' method. (probably a different one for each OS, one for windows, one for linux, one for mac, etc)

BenLand100

2011-01-08 10:17:21

From: moparisthebest
It looks like you maybe didn't commit that part? The only user-agent is the one set for the jar request (which is correct), you'd also want to set a firefox or similar one in the 'downloadHTML' method. (probably a different one for each OS, one for windows, one for linux, one for mac, etc)

My bad, forgot to commit the repos. I modeled the user-agent over an older firefox build, didn't need to set any other properties because java defaulted most of them. After writing that, though, I'm not too sure about the Java user agent sent for the jar…

E: Just did some research, it seem the java-plugin style useragent is correct

moparisthebest

2011-01-09 05:18:08

The request for the jar is correct, at least the user-agent is. I don't know about the rest of the request properties, but it looks right.

Also the code you just committed to grab the HTML as firefox looks correct as well. Now they can't know for sure that it isn't a regular browser at least. :)

Nava2

2011-01-09 09:35:30

The ampersand issue still isn't fixed. :)

Just informing you.

BenLand100

2011-01-09 10:24:28

From: Nava2
The ampersand issue still isn't fixed. :)

Just informing you.

This might be annoying… but… All of your debug output: I want it :D
As of so far, you're the only person that's experienced it again — its the worst kind of bug.

3Garrett3

2011-01-10 16:59:01

Is there a way to replicate it? I could try and help out with at least seeing if it still happens

Nava2

2011-01-10 17:03:16

From: 3Garrett3
Is there a way to replicate it? I could try and help out with at least seeing if it still happens


I think it occurs with non-character keys. So arrows, etc.

BenLand100

2011-01-10 18:44:10

From: Nava2
I think it occurs with non-character keys. So arrows, etc.

The arrow keys do have codes that are ascii characters, but I'm PRETTY sure SMART won't sent the KeyTyped events for them, just KeyPressed and KeyReleased. However, if you can test that and give me the debug, I can figure out what's going on