Batch Maker





Introduction: Batch Maker


This is a project i have been working on for a little wile..
it is made with 2008 and it makes making a batch simple for the newbies...

!!!!!!!!PLEASE NOTE!!!!!!!!!!!!!
it's because i made this on Vista now when i try it on an XP machine it comes up with an error message.. sorry people.

I have to thank TATcreator because even know he doesn't know it he gave me the idea to make this .. lol.

Make sure you look at the First step 'installation' before downloading!!!!

I really hope you like it..
and if you find any problems with it please leave a comment or pm me so i can fix them and repost it...

please comment on what you think to and don't forget to rate it =)

Step 1: Installation

To install follow the steps and pics closely!!!
1) Follow pic 1 if you just get a page with alot of text when you click on the link

2)Click save

3) Make sure you get all the red bits right!!!
Save as .exe And Make sure you save as 'All Files' or it will not work!!!!!

Step 2: How It Works: Part1

The ComboBox

As i said i made it with vb 2008 so there is no batch scripting.
To make it all i really had to do was:

if 'write' is selected in combobox
change label2 to 'Write a message - Do not add the echo!'
show textbox1
change textbox1 text to 'What do you want it to say?'

Which turns out as:

If ComboBox1.SelectedItem = ("Write") Then
Label2.Text = ("Write a message - Do not add the echo!")
TextBox1.Text = ("What do you want it to say?")
End If

I had to keep doing this for every item on the combobox.

Step 3: How It Works: Part2

The Buttons

The buttons were one of the hardest things to do,

The Add Button

For the add button to work I had to do a lot of coding but once I had done that the rest was fairly simple...
Part of the add code:

if 'Write' is Selected in combo box then
add 'echo ' + contents of textbox1

Which turnes out as:

If ComboBox1.SelectedItem = ("Write") Then
ListBox1.Items.Add("echo " + TextBox1.Text)
End If

it was mostly the same for most of them, as shown in the pic.

The remove button is just:
Remove selected item from list
which is:


the clear button just clears the whole list then adds the first two lines again:

ListBox1.Items.Add("::Made With iRule Batch Maker")
ListBox1.Items.Add("@echo off")

and the move up and down code just move selected item up or down:
(code to long to put up)

Step 4: How It Works: Part3

The Save/Load

The Save and Load were probably the hardest part,
This is just the save code:

Dim sfdMain As New SaveFileDialog
sfdMain.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
Dim Result As DialogResult
sfdMain.Filter = "Batch Files (*.bat)|*.bat| CMD Files(*.cmd)|*.cmd"
sfdMain.FilterIndex = 1
sfdMain.ValidateNames = True
Result = sfdMain.ShowDialog
If Result = Windows.Forms.DialogResult.OK Then
Dim sw As New System.IO.StreamWriter(sfdMain.FileName)
For i As Integer = 0 To ListBox1.Items.Count - 1
Exit Sub
End If

if you understand vb you will know what that does but if you don't:
basically, all it does is show the save dialog, and it saves all the contents of the list into a batch file or cmd file



    • Trash to Treasure

      Trash to Treasure
    • Pro Tips Challenge

      Pro Tips Challenge
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    i know this is a bit late, but I think the reason why it would not work on older systems, is because there is no current .NET framework installed.

    works for my win xp computer.

    Hey,nice work. I was just wondering if you could make a tutorial on your "MakeABatch.exe" program. I DO have VB 2008 and I DO know how to code in both Batch(.bat) and Visual Basic(VB).

    Thanks anyway.

    Hey,nice work. I was just wondering if you could make a tutorial on your "MakeABatch.exe" program. I DO have VB 2008 and I DO know how to code in both Batch(.bat) and Visual Basic(VB).

    Thanks anyway.

    got it, im using chrome and xp just download it and rename it to what you want.exe

    chrome...doesnt work for dl.....i suggest a dropbox link...

    When I click on the X when I accidentally poped up the Edit Command popup it said "The value of "index" cannot be "-1"" and the (unhelpful) details button said:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentOutOfRangeException: InvalidArgument=Value of '-1' is not valid for 'index'.
    Parameter name: index
    at System.Windows.Forms.ListBox.ObjectCollection.Insert(Int32 index, Object item)
    at MakeABatch.Start.ListBox1_MouseDoubleClick(Object sender, MouseEventArgs e)
    at System.Windows.Forms.Control.OnMouseDoubleClick(MouseEventArgs e)
    at System.Windows.Forms.ListBox.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Loaded Assemblies **************
    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

    Assembly Version:
    Win32 Version:
    CodeBase: file:///C:/Documents%20and%20Settings/Bob/My%20Documents/Will%60s%20files/MakeABatch.exe

    Assembly Version:
    Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/

    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/

    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/

    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/

    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the section.
    The application must also be compiled with debugging

    For example:

    < jitDebugging="true" />

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    invlaid move menu was trying to set menu item at -1 when lowest is 0

    Heh, the lowest value for a array`s data in C++ (and maybe C) is 1, very confusing for beginners.