[HOW TO] Do a simple GUI to a script
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

[HOW TO] Do a simple GUI to a script

Started by -PT-B2S, 09 September, 2005, 02:16:59

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

-PT-B2S

Hello, i have made an all in one script (with the most functions of robocop, but not so heavy) called JEDi Script.

Now i want to do a GUI to the script. Nothing very complicated. When i have the script with the GUI, i will publish it here.

Can someone help me to do the GUI?

I really don't understand nothin about programing (C++, vb, etc), only LUA. Please help me, and you will have a good LUA5 all in one script in return :)

Thanks

bluebear

Sincerely,
bluebear
--
http://www.thewildplace.dk/ is is closed - Use the following mirrors instead
http://bluebear.psycho-chihuahua.net
http://pxextension.piratez.dk/
[Lua extensions - Chat stats - YnHub PMSpy - DC Source code - and more]

-PT-B2S

#2
bluebear , i tried that, but i think its a bit difficult...

Is there any guide to do a GUI that opens TBL files and write on them, and this things? i mean, my script is like robocop and so many others that work with tbl files...
All i want is to organize the script and make it easier to configure. Any help? it would be precious. Thnks in advance...

Props

Optimus

Check Kepps bot Guarding he published his menu source it's written in .NET maybe you can use that.

- Optimus

-PT-B2S

#4
Thanks Optimus. I really don't know nothin abou .NET, so if there is a guide or something... it will help... Thnks again

If somebody know other way to do a GUI and a guide that explains how to do it, it is welcome too

Thanks

Props    

-PT-B2S


Hello people,

Since there isn't any help, i've tried Visual Basic. It's very easy to work, i think, but i want some help (special help from optimus, i know he knows :P ) with codes to load settings from .tbl files and to save the things inserted in the GUI to the .tbl files.

For example:

iTableMinShare = {
[1] = {
["1-Unit"] = "GB",
["2-Share"] = 50,
},
[2] = {
["1-Unit"] = "GB",
["2-Share"] = 70,
},
[3] = {
["1-Unit"] = "GB",
["2-Share"] = 10,
},
[4] = {
["1-Unit"] = "GB",
["2-Share"] = 0,
},
[5] = {
["1-Unit"] = "GB",
["2-Share"] = 0,
},
[-1] = {
["1-Unit"] = "GB",
["2-Share"] = 1,
},
[0] = {
["1-Unit"] = "GB",
["2-Share"] = 0,
},
}


i have a file called  minshare.tbl  that contains this code.
I want to load this code to the GUI and edit it with the GUI, and then save the file when i close dthe program.

Does somebody have a code of a GUI made in Visual Basic or knows how to do this?

Thanks and good scripts.


.[/B]

Chibok

#6
tries to see this site of information on the subject

or visite this page

**edited to add new link

-PT-B2S

#7
Hello,

It's not this chibok, but thanks. Those links only have LUA and C++ information. I want Visual Basic. Any more?

Thanks and good scripts




.

Chibok

I thought that you intended to make a GUI with LUA :D

-PT-B2S


Optimus

I advice you to use .NET
With visual basic it's way to hard to make it work, you need lots of left$ right$ mid$ etc not nice

Thats why i switched to .NET alot easyer there

-PT-B2S

#11
Hello,

Thanks for the advice optimus.

Can you write here the program's name to do the GUI and the code you use, just to see it and learn from it ???

Tell me everything i need to do a GUI in .NET please.

Thanks again

(if somebody knows something more, i apreciate him to help please.)

Props, and good scripts

 

.

-PT-B2S

#12
nobody???


.

LoTeK_

#13
QuoteOriginally posted by -PT-B2S
Hello,

Thanks for the advice optimus.

Can you write here the program's name to do the GUI and the code you use, just to see it and learn from it ???

Tell me everything i need to do a GUI in .NET please.
 

You could obtain a .NET manual and read it. Much more simple and less timewaster for everyone.
This is not a program where a simple guide or a single post can explain its functionality.

-PT-B2S

#14
hello,

Yes, but if someone just put here a GUI's code, it will be easier for me to learn. Does someone knows where i can get an example? Thanks

bastya_elvtars

QuoteOriginally posted by -PT-B2S
hello,

Yes, but if someone just put here a GUI's code, it will be easier for me to learn. Does someone knows where i can get an example? Thanks

Try meka-meka.com they have a cool programming forum.
Everything could have been anything else and it would have just as much meaning.

Typhoon

well for postingexamples and code that's usefull for you , Optimus allready told your :)
Kepp has released his GUI source from that you can learn what you want, and it's written i C#.NET/Lua5 ..


QuoteOriginally posted by Optimus
Check Kepps bot Guarding he published his menu source it's written in .NET maybe you can use that.

- Optimus


 Typhoon?



Jelf

I am also in the same situation, I have done the GUI just need it to read and write to the bots settings file (.DAT), so have been watchin this thread.

Have tried to get Kepps source for Guarding but cant find it anywhere, also his link is dead in his signature, would be good if someone had this please.

??????Hawk??????

#18
google UK  --->   c# writing to a file


First page, top link..   * Click *

How To: Reading and Writing Text Files 
by Joe Mayo, 2/17/02

Text files provide a common denominator format where both people and programs can read and understand.  The .NET Framework includes convenience classes that make reading and writing text files very easy.  The following sequence outlines the basic steps necessary to work with text files:

Open the file 
Read/Write to the file 
Close the file 
It's that simple.  Listing 1 shows how to write text data to a file.

to a Text File 
Listing 1: Writing Text Data to a File: TextFileWriter.cs
using System;
using System.IO;

namespace csharp_station.howto
{
    class TextFileWriter
    {
        static void Main(string[] args)
        {
            // create a writer and open the file
            TextWriter tw = new StreamWriter("date.txt");

            // write a line of text to the file
            tw.WriteLine(DateTime.Now);

            // close the stream
            tw.Close();
        }
    }
}

This program creates a text file when it runs.  In the directory where the executable program is located, you'll find a file named date.txt.  If you view the contents of this file, you'll see the following textual representation of the date and time when the program last ran:

2/15/2002 8:54:51 PM
The first task in Listing 1 is to open the file.  This happens by instantiating a StreamWriter class, which returns an object of type TextWriter.  The result could have also been assigned to a StreamWriter instance.  The StreamWriter was called with a single parameter, indicating the name of the file to open.  If this file doesn't exist, the StreamWriter will create it.  The StreamWriter also has 6 other constructor overloads that permit you to specify the file in different ways, buffer info, and text encoding.  Here's the line that opens the date.txt file:

            TextWriter tw = new StreamWriter("date.txt");

Using the TextWriter instance, tw, you can write text info to the file.  The example writes the text for the current date and time, using the static Now property of the DateTime class.  Here's the line from the code:

            tw.WriteLine(DateTime.Now);

When you're done writing to the file, be sure to close it as follows:

            tw.Close();

From a Text File 
Listing 2 shows how to read from a text file:

Listing 2: Reading Text Data from a File: TextFileReader.cs
using System;
using System.IO;

namespace csharp_station.howto
{
    class TextFileReader
    {
        static void Main(string[] args)
        {
            // create reader & open file
            TextReader tr = new StreamReader("date.txt");

            // read a line of text
            Console.WriteLine(tr.ReadLine());

            // close the stream
            tr.Close();
        }
    }
}

In Listing 2, the text file is opened in a manner similar to the method used in Listing 1, except it uses a StreamReader class constructor to create an instance of a TextReader.  The StreamReader class includes additional overloads that allow you to specify the file in different ways, text format encoding, and buffer info.  This program opens the date.txt file, which should be in the same directory as the executable file:

            TextReader tr = new StreamReader("date.txt");

Within a Console.WriteLine statement, the program reads a line of text from the file, using the ReadLine() method of the TextReader instance.  The TextReader class also includes methods that allow you to invoke the Read() method to read one or more character or use the Peek() method to see what the next character is without pulling it from the stream.  Here's the code that reads an entire line from the text file:

            Console.WriteLine(tr.ReadLine());

When done reading, you should close the file as follows:

            tr.Close();

This article showed how to write text to a file and read it back out.  For more details on additional methods, consult the .NET Frameworks reference on the StreamWriter, StreamReader, TextWriter, and TextReader classes.

-PT-B2S

#19
QuoteOriginally posted by Optimus
Check Kepps bot Guarding he published his menu source it's written in .NET maybe you can use that.

- Optimus

Hi, would someone please write here another link to the source, since this one seems "dead"???

Thanks and good scripts


.[/B]

Jelf

Thanks for that info Hawk, is C# the same as .Net?? <

-PT-B2S

#21
QuoteOriginally posted by Optimus
Check Kepps bot Guarding he published his menu source it's written in .NET maybe you can use that.

- Optimus

Hi, would someone please write here another link to the source, since this one seems "dead"???

Thanks and good scripts


.[/B]    

Meka][Meka

QuoteOriginally posted by Jelf
Thanks for that info Hawk, is C# the same as .Net?? <

newer c# is .net, vs c#.net

ThreadStarter: I advise NOT to use .net, reason 1, .net to install is 20mb+, meaning users that dont have .net need to dl it....quite annoying for those, unless the project was big, but 20mb for a project of 200k or so...... reason 2, resource usage highly increases, for a small GUI.....
Do you know what \'nemesis\' means? A righteous infliction of retribution manifested by an appropriate agent. Personified in this case by an \'orrible cunt... me.



Pothead

QuoteOriginally posted by Meka][Meka
ThreadStarter: I advise NOT to use .net,
reason 1, .net to install is 20mb+, meaning users that dont have .net need to dl it....quite annoying for those, unless the project was big, but 20mb for a project of 200k or so......
reason 2, resource usage highly increases, for a small GUI.....
a 3rd reason, .Net is just another un-needed level of compilcation.

Meka][Meka

QuoteOriginally posted by Pothead
QuoteOriginally posted by Meka][Meka
ThreadStarter: I advise NOT to use .net,
reason 1, .net to install is 20mb+, meaning users that dont have .net need to dl it....quite annoying for those, unless the project was big, but 20mb for a project of 200k or so......
reason 2, resource usage highly increases, for a small GUI.....
a 3rd reason, .Net is just another un-needed level of compilcation.

well .net is easier to learn, and not far from original vb,or c#, but like i said the first 2 reasons for such a small project, aint good at all....
Do you know what \'nemesis\' means? A righteous infliction of retribution manifested by an appropriate agent. Personified in this case by an \'orrible cunt... me.



SMF spam blocked by CleanTalk