SRL Archive - Help

Re-naming taskbar titles


oonzpoonz

2011-12-18 16:41:34

Is there a way to re-name the Simba and SMART window titles in the taskbar?

Aegis

2011-12-18 16:44:14

I'm not sure about SMART, but I know you can in Simba.

Hold on.

Brandon

2011-12-18 16:45:07

From: oonzpoonz
Is there a way to re-name the Simba and SMART window titles in the taskbar?


Recompile Smart with the name you'd like it to have.. OR write a program to just SendMessage->WindowTitle

and WindowTitle will be the name you'd like smart to have..

Aegis

2011-12-18 16:48:39

StatsGuise('Your Text Here');

Pretty sure that's it. For Simba, anyways.

Runaway

2011-12-18 17:14:30

From: Aegis
StatsGuise('Your Text Here');

Pretty sure that's it. For Simba, anyways.


Isn't that just a procedure that YoHo put in one of his scripts? I believe he used StatsGuise as a conjuction of Status(''); and Disguise('');

The simba window can be renamed with Disguise('');

Brandon

2011-12-18 17:33:40

If I can figure out how to Change PCHAR To LPARAM(TextHere) AND figure out how to do 0x000C in Pascal.. then this will work 100%

Atm all it does is find smart.. U actually need to sendmessage to smart telling it to change it's title..


function FindWindow(ClassName, WindowName: PChar): HWND; external 'FindWindowA@User32.dll stdcall';

function SendMessage(WindowHandle: HWND; Msg: WORD; WPARAM: LongInt; LPARAM: LongInt): LongInt; external 'SendMessage@User32.dll stdcall';

function FindSmart: HWND;
var
Smart: HWND;
begin
Smart:= FindWindow('SunAwtFrame', 'Public SMARTv6.6 - SMART Minimizing Autoing Resource Thing - By BenLand100');
result:= Smart;
end;

Procedure ChangeName(Sender: TObject);
var
T: PCHAR;
WM_SETTEXT: Word;
Temp: LongInt;
begin
Temp:= HexToInt('000C'); //WHAT IS THE Equivalent of 0x000C in PASCAL?! :S
WM_SETTEXT:= Temp;
SendMessage(FindSmart, WM_SETTEXT, 0, T);
end;

Sin

2011-12-18 18:34:52

It's StatGuise, i recently saw it in "YoHoJo"'s video.

oonzpoonz

2011-12-19 20:05:50

Thanks for all the replies everyone. :)

Disguise works in renaming Simba, just have to figure out how to rename SMART

YoHoJo

2011-12-19 20:27:38

From: Runaway
Isn't that just a procedure that YoHo put in one of his scripts? I believe he used StatsGuise as a conjuction of Status(''); and Disguise('');

The simba window can be renamed with Disguise('');


Correct.
StatsGuise is not in SRL/Simba it's just a little thing I made that combines Status and Disguise into one.

Disguise('bla bla') would change the taskbar of Simba to be called bla bla :D

Shatterhand

2012-01-21 08:28:15

Any success of renaming the SMART windows? :)

Daniel

2012-01-21 08:41:24

From: ggzz
If I can figure out how to Change PCHAR To LPARAM(TextHere) AND figure out how to do 0x000C in Pascal.. then this will work 100%

Atm all it does is find smart.. U actually need to sendmessage to smart telling it to change it's title..


function FindWindow(ClassName, WindowName: PChar): HWND; external 'FindWindowA@User32.dll stdcall';

function SendMessage(WindowHandle: HWND; Msg: WORD; WPARAM: LongInt; LPARAM: LongInt): LongInt; external 'SendMessage@User32.dll stdcall';

function FindSmart: HWND;
var
Smart: HWND;
begin
Smart:= FindWindow('SunAwtFrame', 'Public SMARTv6.6 - SMART Minimizing Autoing Resource Thing - By BenLand100');
result:= Smart;
end;

Procedure ChangeName(Sender: TObject);
var
T: PCHAR;
WM_SETTEXT: Word;
Temp: LongInt;
begin
Temp:= HexToInt('000C'); //WHAT IS THE Equivalent of 0x000C in PASCAL?! :S
WM_SETTEXT:= Temp;
SendMessage(FindSmart, WM_SETTEXT, 0, T);
end;


Note for the above code, you need to enable API calls for this to work. Tools -> Settings. Then, expand: Settings -> Interpreter -> AllowSysCalls, and change the value to True :)

Shatterhand

2012-01-22 04:25:36

From: Daniel
Note for the above code, you need to enable API calls for this to work. Tools -> Settings. Then, expand: Settings -> Interpreter -> AllowSysCalls, and change the value to True :)


Ok i got the settings, but cant get those functions to work. I dont understand these codes and i get errors:
[Error] (9:10): Duplicate identifier 'FINDWINDOW' at line 8