Results 1 to 15 of 15

Thread: Typing in diabled SMART

  1. #1
    Join Date
    Aug 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Typing in diabled SMART

    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.

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    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.

  3. #3
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    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.

  4. #4
    Join Date
    May 2007
    Location
    England
    Posts
    4,141
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    ^ 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.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  5. #5
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    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
    SCAR Code:
    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
    SCAR Code:
    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
    Last edited by Shuttleu; 08-29-2010 at 12:21 PM.

  6. #6
    Join Date
    Aug 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.

  7. #7
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Shararazati View Post
    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

  8. #8
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  9. #9
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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

  10. #10
    Join Date
    Sep 2010
    Location
    Northern Kentuckeh
    Posts
    759
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

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

  11. #11
    Join Date
    Jun 2006
    Posts
    694
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    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.

  12. #12
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    ...
    1.) Add this to your script.
    Code:
    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.".
    Code:
    SRL_Procs[srl_AntiBan] := @SMARTCheck;
    and/or 
    SRL_Procs[srl_OnRandomCall] := @SMARTCheck;
    3.) Hit F2 too type in SMART
    Last edited by Dgby714; 09-28-2010 at 01:45 AM.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  13. #13
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Dgby714 View Post
    1.) Add this to your script.
    Code:
    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.".
    Code:
    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

  14. #14
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    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.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  15. #15
    Join Date
    Jun 2006
    Posts
    694
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •