Results 1 to 8 of 8

Thread: Working with forms.

  1. #1
    Join Date
    Apr 2007
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Working with forms.

    Well... I have looked at a bit of tutorials and I don't quite understand how it works. I made a form saved it. then pasted the form code in the middle of "begin" and "end" It does'nt work. I would also like to know how I would be able to make it so when I press a button it exicutes a script

  2. #2
    Join Date
    Apr 2007
    Posts
    581
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    In your SCAR main script folder, in the test folder, there should be a script called 'Formtut.scar' or something similar to that. Run that script and examine it, then examine the coding. ^_^

  3. #3
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There is actually a form parser in the members section that will automatically turn it into a form that works lol.

    But what you need in your script is this:

    SCAR Code:
    Program New;
    {.include SRL/SRL.scar}

    var
    //your variables

    Procedure InitForm;
    begin
    //the form that you made here
    end;

    Procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;


    Function ShowFormModal: Boolean;
    begin
      Result:= False;
      if(frmDesign.ShowModal = mrOk)then Result:= True;
    end;


    Procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;


    begin
      SetupSRL;
      SafeInitForm;
      SafeShowFormModal;
    end.
    and on the line that says this in your form:
    frmDesign.Visible := True;
    make it
    frmDesign.Visible := False;

  4. #4
    Join Date
    Apr 2007
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Whats the diffrence?

  5. #5
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What do you mean "whats the difference"? I just showed you how to use a form made in the form editor in a script so it will load.

  6. #6
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    if thats how easy forms are then why doesnt everyone use them...like wizzup? and sumillion evryone else?

  7. #7
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    where can u find all the commands u can type in buttonclick procedure?
    Sleeping...

  8. #8
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ive been wondering that also. I learn from looking throuhg other peoples scripts and I have gotten pretty good with forms.

    And dan cardin, I offered wizzup a form for his script, but he said he didn't use a form for his own reasons. Idk why, but he would prefer not to use them, id kwhy.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ~~~~Working Edge cooker WORKING~~~
    By NiCbaZ in forum RS3 Outdated / Broken Scripts
    Replies: 5
    Last Post: 10-29-2007, 11:16 PM
  2. Help on Forms
    By l33t_h4x0r in forum OSR Help
    Replies: 2
    Last Post: 10-25-2007, 08:13 AM
  3. Forms Forms Forms
    By Zarric Hyunmin in forum OSR Help
    Replies: 2
    Last Post: 10-13-2007, 04:20 AM
  4. [Working on].:Autoseller:.[/Working on]
    By dritar in forum First Scripts
    Replies: 10
    Last Post: 10-07-2007, 06:13 AM
  5. Need help with forms!
    By Da Der Der in forum OSR Help
    Replies: 2
    Last Post: 01-14-2007, 07:13 PM

Posting Permissions

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