Jump to content

A couple of questions regarding a network and some .ini file questions.


kjpolker
 Share

Recommended Posts

I am in the process of creating a small little GUI program that acts as a test. However I ran into speed bumps when I only knew of one great place to find my answer, the forums! Basically my questions I need to know consist of:

1. I need to know a pretty easy to set up way for information of the ini file to be sent around a network with an admin. This is for my class on computers my teacher wanted to see what I could come up with in autoit for some sort of test on binary he is teaching. All the students have their own drive with their name that they log into on a Windows XP machine but have very few rights since the Lab teacher is the Administrator of it. I want to know what is recomended for me to be able to send the teacher a small summary like text or something that will tell him the students name, the score, and etc...That is all easy to make that, I just want to know HOW I can do it.

2. The simplest question of this matter is can I have spaces in a ini file or do I need to put semi-colins in them? Here is a look at what my ini file has in it so you can understand what exactly is going on:

[Login]
; Please enter the master user name and password that will be used to enter the program as Administrator. Default is Admin, Admin.
User=Admin
Pass=Admin
;
[Student Info]
; Here is where you can see the name of the student who took this test.
Student Name=
;
[Settings]
; Please say how many questions there are going to be on the test. Default amount is 50.
;
Questions=50
;
; This is the section where you input the binary you like shown on the screen (In the question slot)
; And the answer that must be inputed on the screen (In the answer slot).
; Example is shown on the first question. 1010 is shown on the screen and the user must enter 10 in the input box in order to get credit.
;
Question1=1010
Answer1=10
Question2=
Answer2=
Question3=
Answer3=
Question4=
Answer4=
Question5=
Answer5=
Question6=
Answer6=
Question7=
Answer7=
Question8=
Answer8=
Question9=
Answer9=
Question10=
Answer10=
Question11=
Answer11=
Question12=
Answer12=
Question13=
Answer13=
Question14=
Answer14=
Question15=
Answer15=
Question16=
Answer16=
Question17=
Answer17=
Question18=
Answer18=
Question19=
Answer19=
Question20=
Answer20=
Question21=
Answer21=
Question22=
Answer22=
Question23=
Answer23=
Question24=
Answer24=
Question25=
Answer25=
Question26=
Answer26=
Question27=
Answer27=
Question28=
Answer28=
Question29=
Answer29=
Question30=
Answer30=
Question31=
Answer31=
Question32=
Answer32=
Question33=
Answer33=
Question34=
Answer34=
Question35=
Answer35=
Question36=
Answer36=
Question37=
Answer37=
Question38=
Answer38=
Question39=
Answer39=
Question40=
Answer40=
Question41=
Answer41=
Question42=
Answer42=
Question43=
Answer43=
Question44=
Answer44=
Question45=
Answer45=
Question46=
Answer46=
Question47=
Answer47=
Question48=
Answer48=
Question49=
Answer49=
Question50=
Answer50=

I need to know how to implement the works of this ini into my script. For one how do I set a dual username and password type deal to where the teacher states his desired username and password (default, admin, admin) and if that is typed in a input box than he has the ability to see all the students test results that was described above. BUT if a different username and password is entered (doesn't really matter at all what it is since I can't find out the real info of each student and put it in) than it takes them to the simple GUI box of the test that I will show below.

Please help me out here, I know if you have read this far down what does 5 more minutes just helping hurt? I am asking for any help at all since christmas break is around the corner and we won't be talking about binary forever! Thank you so much for anything.

Here is my script so for:

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.0.0
 Author:         myName
 Script Function: A simple test to see if you know your binary!
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

HotKeySet( "{PAUSE}", "TogglePause")
Global $Paused

#Region ### START Koda GUI section ### Form=
$Binary = GUICreate("Binary Test", 362, 130, 192, 124)
GUISetBkColor(0x000000)
$Button1 = GUICtrlCreateButton("Next", 272, 100, 81, 25, $WS_GROUP)
GUICtrlSetCursor (-1, 0)
$Label1 = GUICtrlCreateLabel("Label1", 8, 48, 36, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$Value = GUICtrlCreateInput("Value", 192, 48, 161, 21)
GUICtrlSetCursor (-1, 5)
$Label2 = GUICtrlCreateLabel("1 of 50", 8, 112, 37, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$Label3 = GUICtrlCreateLabel("Self Binary Test", 109, 8, 173, 20)
GUICtrlSetFont(-1, 12, 400, 0, "TagsXtreme")
GUICtrlSetColor(-1, 0x00FF00)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc
Edited by kjpolker
Link to comment
Share on other sites

Thank you, what I was thinking of is how basically the entire test database is in my config.ini file and I might be better off using (however I am not sure how to make one) is a dynamic link library, I am almost sure a DLL is compressing information for a program to retrieve notes from it, am I right? I just spat down my coding in the first post for your to get a good idea of what was happening however I am open for any suggestions or changes at all.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...