SRL Archive - First Scripts

Widget's Super-Form


Widget

2007-03-30 21:08:22

You are allowed to use this in your scripts so long as my name gets stuck in the title. ForegroundColor and BackgroundColor are obvious constants. The usernames get stuck in User[1] as Player 1 through User[5] as Player 5 (NOT 0 through 4, as that's really confusing). Passworsd are Pass[1] through Pass[5].

This isn't really related to Runescape, but it's something other scripters could really use, and hopefully will use it.

Its a player form, simple as that. I tried to make it somewhat customizable, and it worked to some extent. Just put it in Scar and run it. Screw around with it and see what it does :p

Feedback, bugs, comments, rants about it not being a real script, whatever.

V1.0 First Release
- Supports 5 Accounts
- Disables unused accounts
- 3 Variable Boxes for whatever you may need

Future updates
- Saving to text file
- Loading saved text file

- Widget

Edit: I put player one as user[1] and pass[1], just as the 5th account is user[5], since having the first person as 0 is a bit confusing.

Rune Hacker

2007-03-30 22:10:16

Ive been looking for something like this for a long time because i love scripts with it in it so ty lol.

But how i do change the size of stuff and move stuff around knowing where it will end up because ide want to move stuff around but how can i see where its going by putting in its size and coords?

Smartzkid

2007-03-30 22:24:55

He'd have to post the main form file (.dfm).

Looks pretty cool, but it'd be nicer if it would do unlimited accounts (like the srl one)

Widget

2007-03-30 23:40:32

From: rune hacker
Ive been looking for something like this for a long time because i love scripts with it in it so ty lol.

But how i do change the size of stuff and move stuff around knowing where it will end up because ide want to move stuff around but how can i see where its going by putting in its size and coords?


I didn't use the form editor, since it keeps screwing up my coords. It's pretty simply though, like I think the first username box was (15,10) with a width of 200, so the password box for that would be (215,10).

From: Smartzkid
He'd have to post the main form file (.dfm).

Didn't use a DFM, hand-coded :D

From: Smartzkid
Looks pretty cool, but it'd be nicer if it would do unlimited accounts (like the srl one)

The problem with the SRL one is it's confusing and not all that well organized, thats why I made this

—

Oh, might as well put this here. This is a huge time-saver for making any custom forms:
program Form;
// By Widget
const
{+============================================================+}
{|} master = 'WidgetForm'; {|{ Parent form |}
{|{============================{|{==========================={|}
{|} element = 'TButton'; {|{ What type it is |}
{|{============================{|{============================|}
{|} name = 'Cancel'; {|{ It's name |}
{|{============================{|{============================|}
{|} caption = 'Cancel'; {|{ Value of it |}
{|{============================{|{==========================={|}
{|} text = ''; {|{ Value of it |}
{|{============================{|{==========================={|}
{|} width = '60'; {|{ Width |}
{|{============================{|{==========================={|}
{|} height = '20'; {|{ Height |}
{|{============================{|{==========================={|}
{|} color = ''; {|{ Background color |}
{|{============================{|{==========================={|}
{|} fontColor = ''; {|{ Text color |}
{|{============================{|{==========================={|}
{|} fromTop = '70'; {|{ Pixels from top of screen |}
{|{============================{|{==========================={|}
{|} fromLeft = '425'; {|{ Pixels from left of screen |}
{+============================={|{============================+}

indent = ' '; // How far to indent things

begin
cleardebug;
// writeln('// Form element generated by');
// writeln('// Widgets form generator...');
// writeln('');

writeln(indent+name+' := '+element+'.Create('+master+');')
writeln(indent+name+'.Parent := '+master+';')
if not (width='') then
writeln(indent+name+'.width := '+width+';')
if not (height='') then
writeln(indent+name+'.height := '+height+';')
if not (fromLeft='') then
writeln(indent+name+'.left := '+fromLeft+';')
if not (fromTop='') then
writeln(indent+name+'.top := '+fromTop+';')
if not (color='') then
writeln(indent+name+'.color := '+color+';')
if not (fontColor='') then
writeln(indent+name+'.font.color := '+fontColor+';')
if not (caption='') then
writeln(indent+name+'.caption := '+Chr(39)+caption+Chr(39)+';')
if not (text='') then
writeln(indent+name+'.text := '+Chr(39)+text+Chr(39)+';')
//writeln(indent+name+'.visible := True')
writeln('')
// writeln('// Remember to add " var '+name+':'+element+'; ".')
end.

- Widget

EDIT!:
From: Smartzkid
Looks pretty cool, but it'd be nicer if it would do unlimited accounts (like the srl one)

I just realized I can do arrays of TEdits… I'll be working on this =D

Rune Hacker

2007-03-31 00:34:09

Where is tutorial on how to use the form editor?????? Ide love to make my own because it looks cool.

nielsie95

2007-03-31 08:03:06

Very nice :). Maybe you could also add a Main/Normal form; where you can put in colors, some options and maybe a shortcut to this PlayerManager.

Hey321

2007-03-31 14:36:10

From: Widget


Didn't use a DFM, hand-coded :D



Widget, you must be a god with forms then. I mean, better then Sky, and he's amazing :O.

Widget

2007-03-31 23:26:59

From: hey321
Widget, you must be a god with forms then. I mean, better then Sky, and he's amazing :O.

Yay I feel special . Now who is this Sky you speak of… :p

Fixed a few minor bugs and plugged the memory leak in it. The tab order is being a bit weird, it should go from user 1 to pass 1 to user 2 etc, but its going u1,u2,p1,u3,p2,u4,etc. (I probably confused most of you with that >.<)

Still trying to figure out how to use arrays of TEdits and TCheckBoxes. Right now they're not showing up right… I have a different method in mind, but It'll take awhile to test.

- Widget

Hehe edit: Looked at sky's random form game and died