Jump to content
Sign in to follow this  
Irongator

How to do this?(what references should I look at?)

Recommended Posts

Irongator

Hi! I'll just start off by making it clear that I'm not asking for someone to do this for me, or give me step by step instructions. I just want a push in the right direction, because I'm lost. If you don't have time to read the whole thing, then just skip down to the bottom where I'll list the things I want to learn to do.

So anyway, here is the GUI I've made. Its not supposed to be complete, but I think its going to work okay. I've posted a marked image and the code.

Posted Image

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\daniel\documents\equations\programs\coding\raw score outputter alpha gui.kxf
$Form1_1 = GUICreate("Form1", 540, 426, 192, 124)
$Combo1 = GUICtrlCreateCombo("Combo1", 0, 0, 153, 25)
$Button1 = GUICtrlCreateButton("Add Packet", 152, 0, 67, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Add Sheet", 152, 24, 67, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Input Raw Scores", 0, 328, 147, 97, $WS_GROUP)
$List1 = GUICtrlCreateList("", 0, 24, 153, 305)
$Input1 = GUICtrlCreateInput("Input1", 352, 16, 185, 21)
$List2 = GUICtrlCreateList("", 352, 40, 185, 266)
$Button4 = GUICtrlCreateButton("Load", 184, 328, 57, 25, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Save", 240, 328, 57, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Alright, now an explanation of what I'm wanting to do. I'm trying to make something for my family's small business. I won't go into detail, but its basically for inputting raw scores into a program that calculates more advanced things(like percentiles, averages, etc.)

We do mail orders, and send a test out. The person does the test at their house, and then sends it back in a mail envelope(what I call a "packet").

The packet usually contains multiple "sheets"(sheets with bubbles on them that the person fills in). I grade these with a special device that shows the incorrect answers.

Alright, now for the program.

The yellow section in the picture is basically where I am planning on entering the total for that section and how many they got wrong. (for example 40-5, for 35). The section below would display the numbers I put in, for reference purposes. I am also planning on adding some way to right click to change the numbers.

The red section would be where I would add and select packets, and the blue section would be where I add or select sheets for each packet. The blue "sheet" section would basically be like a sub-folder, and the yellow section would be like a sub-folder of the blue section.

The purple button would input the variables from the yellow section into the grading program I mentioned earlier. I'm planning on doing this with "winswitch", "send", and "mouseclick";I'm not terribly worried about this, I think I know enough to make it work.

Finally, and this is the biggest one-the green section. I need to be able to save and load a list of packets, so that I can email them. Originally, I was planning on using the "#include" command, but according to the help file, it can't do variables, only strings.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So, a summary.

-I want to learn how to make the GUIs work. I already know how to assign functions to the buttons, but I don't know how to make an input box feed into an edit box, or things like that. I want to learn to add and remove things from the combo boxes, and how to make it so I can right click to rename/remove something in a list box.

Finally, I want to learn to be able save and load a file that will contain variables that the combo box can use, for example, or how to be able to change something in the EXE from the GUI and then save it so that I can send the EXE, or how I can list variables in a .txt(or other type) of file and make it so that the combo box can use them.

I would really prefer a way to add/remove variables in the exe from the GUI, and then just send the .exe itself, but I'll take anything I can get.

I realize I wrote a lot, and I'm asking a lot, but I would be eternally grateful to anyone who can point me to a help file or tutorial where I can learn to do these. I would normally just read through one of the many tutorials available, but it would take weeks to advance to what I need, and I need to make this program pretty soon.

Thank you for your time.

Share this post


Link to post
Share on other sites
Melba23

Irongator,

I'm not asking for someone to do this for me

it would take weeks to advance to what I need, and I need to make this program pretty soon

I am afraid those 2 statements are mutually exclusive. ;) You cannot just start building complex scripts without the basic knowledge of the commands and script structure of AutoIt. If you try to do so, you (and us here answering the inevitable plethora of questions : ) are going to get very frustrated. Creating a GUI in KODA is a simple first step - the vast majority of the work is ahead of you, which I am sure you realise.

So, my first piece of advice: Slow down. Even if you do produce a roughly patched together piece of code, it will soon fail and you will find it impossible to maintain in the long term.

Second piece: Reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at the excellent tutorials that you will find here and here. Once you have a good handle on how AutoIt works, then you can begin to think about how you might write your script.

Third piece: Break down what you want to do into simple steps. At the moment, I am afraid I have very liitle understanding of what you are trying to do from your description above - and if you cannot explain it clearly, then you almost certainly cannot code it clearly either. :P

I am sorry if this seems a little (or even very!) negative - but there is really no short cut to what you are trying to do if you want something that actually works. You know where we are when you need help on a specific item in your script.

Good luck. :blink:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Irongator

Irongator,

I am afraid those 2 statements are mutually exclusive. ;) You cannot just start building complex scripts without the basic knowledge of the commands and script structure of AutoIt. If you try to do so, you (and us here answering the inevitable plethora of questions : ) are going to get very frustrated. Creating a GUI in KODA is a simple first step - the vast majority of the work is ahead of you, which I am sure you realise.

So, my first piece of advice: Slow down. Even if you do produce a roughly patched together piece of code, it will soon fail and you will find it impossible to maintain in the long term.

Second piece: Reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at the excellent tutorials that you will find here and here. Once you have a good handle on how AutoIt works, then you can begin to think about how you might write your script.

Third piece: Break down what you want to do into simple steps. At the moment, I am afraid I have very liitle understanding of what you are trying to do from your description above - and if you cannot explain it clearly, then you almost certainly cannot code it clearly either. :P

I am sorry if this seems a little (or even very!) negative - but there is really no short cut to what you are trying to do if you want something that actually works. You know where we are when you need help on a specific item in your script.

Good luck. :blink:

M23

=/

Okay, I see what you're saying. I guess I'll just have to do it old-fashioned for a while, while I learn AUTOIT.

Thanks for setting me straight. I'll study a little bit every day of those tutorials, and hopefully I'll be able to do what I'm wanting eventually.

Again, thank you. I'll take things slow.

Share this post


Link to post
Share on other sites
Melba23

Irongator,

As I often say, there is no shame in being a "newb" - we all started there at one time :P !

Please ask questions if you get stuck - as long as you have had a go at solving your problems first, you will find a great deal of help here. :blink:

M23

P.S. A couple of good tips to get you off to a good start: ;)

When you get around to posting code please use Code tags. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here). Or press the blue button just under the BOLD toolbar button.

When you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your reply and the whole thread becomes easier to read.


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×