SRL Archive - Help

Typing in diabled SMART


Shararazati

2010-08-28 19:37:42

Is it possible to enter text in SMART when disabled?

I can enter mouse clicks, but not keyboard strokes.

Seems like being able to type would go a long way toward not getting banned.

i luffs yeww

2010-08-28 20:38:59

Disable it, enable it, disable it, click in the chat box, then type. If it doesn't work, try that a few times and minimize and restore a few times after each time.

Coh3n

2010-08-28 22:53:40

There was a system (RM wrote it I think?) where you could type something into a text box of some form and it would send that text to the script, then your player would type it. That actually sounds like it would be a sweet Simba extension.

Other than that, there's no other way to type while SMART is disabled.

Rich

2010-08-29 07:23:23

^ I think it was something like this:

Press F2, and ReadLn would pop up asking you what you wanted to type. Simple, but effective. I agree with the idea of a Simba extension.

Shuttleu

2010-08-29 07:29:32

is there anyway to interact between the extensions and the script without ini files?, otherwise it could be hard

~shut

EDIT: or have something in SRL which is called regularly which can check the ini file, but then how would it know which simba its meant for…?

EDIT: nice and simple
this goes somewhere where it will be called a lot in SRL
procedure WriteSMART;
begin
if StrToBool(ReadINI('Changed', 'Changed', IncludePath+'SRL/SRL/SmartSendLine.INI')) then
begin
WriteINI('Changed', 'Changed', 'False', IncludePath+'SRL/SRL/SmartSendLine.INI');
TypeSend(ReadINI('SMART', 'SMART', IncludePath+'SRL/SRL/SmartSendLine.INI'));
end;
end;
and this is an extension
program SMARTTalker;

var
MainMenuItem, MenuSMARTForm: TMenuItem;

procedure SMARTReadLine(Sender: TObject);
var
TheLine: string;
begin
TheLine:= ReadLn('What to type?');
if (Length(TheLine) > 0) then
begin
WriteINI('Changed', 'Changed', 'True', IncludePath+'SRL/SRL/SmartSendLine.INI');
WriteINI('SMART', 'SMART', TheLine, IncludePath+'SRL/SRL/SmartSendLine.INI');
end;
end;

procedure Init;
begin;
MainMenuItem := TMenuItem.Create(Simba_MainMenu);
MainMenuItem.Caption := 'SMART';
Simba_MainMenu.Items.Add(MainMenuItem);

MenuSMARTForm := TMenuItem.Create(MainMenuItem);
MenuSMARTForm.Caption := 'Type Line';
MenuSMARTForm.OnClick := @SMARTReadLine;
MainMenuItem.Add(MenuSMARTForm);

end;

procedure Free;
begin

end;

procedure Attach;
begin;

end;

Procedure Detach;
begin

end;

function GetName : string;
begin;
result := 'SMART Talker';
end;

function GetVersion : string;
begin;
result := '1.0';
end;

begin
end.

the reason for INI files is because i havent found any way (other than INI files) to interact between extensions and scripts

Shararazati

2010-08-29 22:28:08

Wow thanks for all the help.

I'll try a few / all of those.

I did find that I can type in SMART if it is disabled and my script is stopped, but not if my script is paused.

Shuttleu

2010-08-30 06:35:26

From: Shararazati
Wow thanks for all the help.

I'll try a few / all of those.

I did find that I can type in SMART if it is disabled and my script is stopped, but not if my script is paused.
there is only one at the mo, what i posted :)

~shut

Shuttleu

2010-09-27 18:06:38

bump, wondering if you would consider adding what i posted above

~shut

Naike

2010-09-27 18:12:15

I remember doing a ReadLn, and added the check with the in-build pointers in SRL..

OnRandomCall, or something like that, check it out, works very well ;)

doublex8

2010-09-27 20:21:55

Sorry I am extremely new to this. What does the code Shuttleu posted let you do? Does it let you type?

Wyn

2010-09-27 21:17:43

What I usually do to be able to type is…

1. Spam the crap of of the enable/disable button bout 7/8 times.
2. Click the compass.
3. Voila.

Dgby714

2010-09-27 21:42:56

From: Shuttleu
…


1.) Add this to your script.
procedure SMARTCheck;
var
Data: string;
begin
if (IsKeyDown(VK_F2)) then
if (InputQuery('SMARTCheck', 'What would you like too say in SMART?', Data)) then
TypeSend(Data);
end;

2.) Then add one or both of these too the main "begin end.".
SRL_Procs[srl_AntiBan] := @SMARTCheck;
and/or
SRL_Procs[srl_OnRandomCall] := @SMARTCheck;

3.) Hit F2 too type in SMART

Shuttleu

2010-09-28 03:59:11

From: Dgby714
1.) Add this to your script.
procedure SMARTCheck;
var
Data: string;
begin
if (IsKeyDown(VK_F2)) then
if (InputQuery('SMARTCheck', 'What would you like too say in SMART?', Data)) then
TypeSend(Data);
end;

2.) Then add one or both of these too the main "begin end.".
SRL_Procs[srl_AntiBan] := @SMARTCheck;
and/or
SRL_Procs[srl_OnRandomCall] := @SMARTCheck;

3.) Hit F2 too type in SMART

well maybe that should be in SRL?
maybe under the name of SMARTCheckType

~shut

Wizzup?

2010-09-28 08:31:40

How would this work if you're running several scripts? ;) It's fine as a small tool but I don't think it should be in SRL.

Wyn

2010-09-28 09:09:11

From: Wizzup?
How would this work if you're running several scripts? ;) It's fine as a small tool but I don't think it should be in SRL.


As a option. :stirthepot: