SRL Archive - Other Scripts

Transperament


Smartzkid

2007-04-27 20:54:20

An experiment in transparency.

(made in divi 3.04. might work in 3.03)

EDIT:
Version 2. Fixes the problem that results when you set your client as scar.

Jason2gs

2007-04-27 21:34:27

Oooh :D

LOVE IT!

This is fun…

Alright, now what can I use it for? (:D)

Smartzkid

2007-04-27 22:25:34

:D Actually…I was wondering that, too

Mjordan

2007-04-27 22:34:56

OOO I really like that, we can surely think of a use for this. Maybe some privacy things or something, so parents can't figure out how to stop a script or something lol?

Mr.Klean

2007-04-27 22:43:34

Ooh thats fun, lol,

Now to figure out ideas on what to use it for.

Rune Hacker

2007-04-28 01:01:31

Wow…….thats amazing lol.

Where do you learn this shit lol. Delphi?

Infantry001

2007-04-28 14:26:04

THat is so cool…!!!!!

Smartzkid

2007-04-28 14:50:20

:) Thanks

I still haven't figured out how it could be useful.

(though it is alot of fun to make the taskbar transparent)

Jason2gs

2007-04-28 19:03:12

I haven't been able to make the task bar transparent :(

I'll try it again..

Edit: Nope, still no task bar transparentness :(

Smartzkid

2007-04-28 19:13:11


You have to make sure that you select the whole taskbar, not just a piece of it

Jason2gs

2007-04-28 20:49:08

Oooh, cool :D

Quick Links? *Yech*

Boreas

2007-04-28 21:22:21

If you can make the debug image transparent I might have a use for it…

Smartzkid

2007-04-28 22:59:29

Hmmm…

I believe it's possible…

I'll post back in a bit with some results

Mjordan

2007-04-28 23:04:00

Is there someway you could make the RS screen and SCAR transparent so noone would even know you were autoing? Or would a script even run right if the RS screen was invisible?

And there could be many uses for this. For my personal uses anyways…

Smartzkid

2007-04-28 23:52:05

I started out with this:

program Demonstrate;
var
o,d,i:integer; //o - the original client window handle
begin //d - the debug window handle
//i - the fade loop counter variable

//Display a 250 x 250 block of the client window
DisplayDebugImgWindow(250, 250);
CopyCanvas(GetClientCanvas, GetDebugCanvas, 12, 17, 262, 267, 0, 0, 250, 250);
Wait(500);

//Save the original client window handle
o := GetClientWindowHandle;

//Make the client transparent
MakeWindowTransparent(o, 50);

//Get the debug window's handle
FindWindowTitlePart('Debug I',false);

//Save the debug window's handle
d := GetClientWindowHandle;

//Fade the debug window
for i := 255 downto 1 do
begin
MakeWindowTransparent(d, i);
wait(1);
end;

//Manipulate the debug image while transparent
CopyCanvas(GetDebugCanvas, GetDebugCanvas, 0, 0, 250, 250, 250, 250, 0, 0);

for i := 1 to 255 do
begin
MakeWindowTransparent(d, i);
wait(1);
end;

//Set the handle back to what it was originally
SetClientWindowHandle(o);

//Flip the debug image back to normal
CopyCanvas(GetDebugCanvas, GetDebugCanvas, 0, 0, 250, 250, 250, 250, 0, 0);

//Make the original window opaque again
MakeWindowTransparent(o, 255);


//By setting the original winow opaque in the end, this script
//shows that it does not lose the client
end.


I have since refined it into this procedure:

procedure MakeDebugTransparent(howmuch:integer);
var
o,d:integer;
begin
if(howmuch > 255)then
howmuch := 255;

if(howmuch < 0)then
howmuch := 0;

//Save the original client window handle
o := GetClientWindowHandle;

//Get the debug window's handle
FindWindowTitlePart('Debug I',false);

//Save the debug window's handle
d := GetClientWindowHandle;

//Make the debug window transparent
MakeWindowTransparent(d, howmuch);

//Set the handle back to what it was originally
SetClientWindowHandle(o);
end;

Jason2gs

2007-04-28 23:58:51

:O

Well isn't that spiffy…

Smartzkid

2007-04-29 00:01:20

@ Mjordan: You could make scar and rs transparent, but the mouse would still be movin around :D (ofcourse, you could just make a blank cursor)

I made this to confirm that colorfinding works on transparent windows:

program TestAlphaColors;
begin
//Make sure that the window is completely opaque
MakeWindowTransparent(GetClientWindowHandle, 255);

//Get the color of a pixel
writeln(inttostr(getcolor(288,17)));
wait(500);

//Make the window partially transparent
MakeWindowTransparent(GetClientWindowHandle, 150);
wait(500);

//Get the color of the same pixel that was gotten before
writeln(inttostr(getcolor(288,17)));
wait(500);

//Make the window completely transparent
MakeWindowTransparent(GetClientWindowHandle, 0);
wait(500);

//Get the color of the pixel again
writeln(inttostr(getcolor(288,17)));
wait(500);

//Make window opaque once again
MakeWindowTransparent(GetClientWindowHandle, 255);
end.

PS: Jason, used your code to grab the client image and put it in the debug window, I just expanded it by 200 pixels :D Thanks

EDIT: Whazzah! What happened to my siggy!?!?!?!?

Jason2gs

2007-04-29 01:02:01

*brain storms*

What code… What code…

*done brain storming*

What code?

Smartzkid

2007-04-29 01:10:17

A little script you wrote in a reply to yakman's canvas tut

Jason2gs

2007-04-29 01:23:17

Oooh, that one :p

Yeah, that was a cool one…

Smartzkid

2007-04-30 17:32:56

I have yet to figure out any practical cheating uses for this :redface:

Though it is a nice excuse not to do homework :D

It's also pretty neat to be able to watch movies through the ms word window

Jason2gs

2007-04-30 18:28:21

Heh, cool :)

SKy Scripter

2007-04-30 23:31:44

this great i haven't had time to look at the new things in the new
SCARs, but i REALLY like this lol.. im sure there alot a of thing you can do
with this…… :D