Sign in to follow this  
Followers 0
keen

Need A Little Help Please.

8 posts in this topic

Hey Guys. I need to know how to do a few things:

1: I need to know how to make something write a ini file but make the key cout off (Example: 1... 2... 3...)

2: I need to know how to make a space in the file when it writes it. Like go down two lines then put the submitted data.

3: I need to know how to make iniread to read the different keys from question one.

Thanks in avance :P

-keen


[center]Kesne's Bar & Grill[/center]

Share this post


Link to post
Share on other sites



Question #1:

For $i = 1 To 10    
    IniWrite("Test.ini", "Section One", $i, "value number " & $i)
NextoÝ÷ ٲبf®¶­sdæw&FRgV÷CµFW7BæægV÷C²ÂgV÷Cµ6V7FöâöæRgV÷C²ÂgV÷C²gV÷C²Â5$ÄboÝ÷ ٲبv®¶­sdf÷"b33c¶ÒFò æ&VBgV÷CµFW7BæægV÷C²ÂgV÷Cµ6V7FöâöæRgV÷C²Âb33c¶ÂgV÷C´FFæ÷Bf÷VæBâgV÷C²¤æW@

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

Whoops, that was a pretty useless IniRead. :P


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

Its not counting off. It goes right to 10001. Any help?

#include <GUIConstants.au3>
#include <File.au3>
#include <XSkin.au3> 

; folder of skin
$Skin_Folder = @ScriptDir & "\graphics files"
$XSkinGui = XSkinGUICreate("Vault - Version 1.0.0", 1120, 790, $Skin_Folder)

$Icon_Folder = @ScriptDir & "\icons"
$XIcon = XSkinIcon($XSkinGui, 3)
;$XIcon[1] = Exit,$XIcon[2] = minimize,$XIcon[3] = Help

WinMove($XSkinGui, "", 149, 114); move the gui

GUISetBkColor(0xFFFFFF)
$Pic1 = GUICtrlCreatePic("S:\My Documents\JORDANS STUFF\Vault - Mrs. Johnsons Program\Graphics Files\Main-Image.gif", 104, 0, 750, 150, BitOR($SS_NOTIFY,$WS_GROUP))


$Button1 = GUICtrlCreateButton("Admin Login", 900, 100, 81, 25, 0)

GUICtrlCreateTab(75, 170, 975, 547)
$Date1 = GUICtrlCreateDate("", 97, 680, 233, 24)
$TabSheet2 = GUICtrlCreateTabItem("Check Out")
$Label1 = GUICtrlCreateLabel("Welcome to the checkout system. Please fill out the information at the bottom of the screen to check a book out.", 14, 237, 966, 20, $SS_CENTER)
$Group1 = GUICtrlCreateGroup("Check Out", 129, 320, 857, 337)
$Input1 = GUICtrlCreateInput("", 314, 368, 241, 24)
$Label2 = GUICtrlCreateLabel("Your Name (First And Last):", 145, 368, 163, 20)
$Label3 = GUICtrlCreateLabel("Class Period:", 145, 416, 84, 20)
$Input2 = GUICtrlCreateInput("", 233, 416, 17, 24)
$Label4 = GUICtrlCreateLabel("Name Of Book:", 297, 416, 95, 20)
$Input3 = GUICtrlCreateInput("", 401, 416, 241, 24)
$Label5 = GUICtrlCreateLabel("Date Checked Out:", 689, 416, 116, 20)
$Input4 = GUICtrlCreateInput("", 809, 416, 145, 24)
$Button2 = GUICtrlCreateButton("Log Book Checkout", 489, 576, 130, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet3 = GUICtrlCreateTabItem("Returning Books")
$Label1 = GUICtrlCreateLabel("Welcome to the checkout system. Please fill out the information at the bottom of the screen to Return a book.", 14, 237, 966, 20, $SS_CENTER)
$Group2 = GUICtrlCreateGroup("Return", 129, 320, 857, 337)
$Inpur1 = GUICtrlCreateInput("", 314, 368, 241, 24)
$Labelr2 = GUICtrlCreateLabel("Your Name (First And Last)", 145, 368, 163, 20)
$Labelr4 = GUICtrlCreateLabel("Name Of Book:", 297, 416, 95, 20)
$Inpur3 = GUICtrlCreateInput("", 401, 416, 241, 24)
$Labelr5 = GUICtrlCreateLabel("Date Returned:", 689, 416, 116, 20)
$Inpur4 = GUICtrlCreateInput("", 809, 416, 145, 24)
$Laber3 = GUICtrlCreateLabel("Class Period:", 145, 416, 84, 20)
$Inpur2 = GUICtrlCreateInput("", 233, 416, 17, 24)
$Buttor2 = GUICtrlCreateButton("Log Book Return", 489, 576, 110, 25, 0)

For $i = 1 To 10000
    Next

GUISetState(@SW_SHOW)



While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $Button2
          IniWrite (@ScriptDir & "\CheckedOut.ini","",$i,"  Name: "&GUICTrlRead($Input1)&"  Period: "&GUICTrlRead($Input2)&"  Name of book: "&GUICTrlRead($Input3)&"  Date Checked Out: "&GUICTrlRead($Input4))
            GUICtrlSetData ($Input1,"")
            GUICtrlSetData ($Input2,"")
            GUICtrlSetData ($Input3,"")
            GUICtrlSetData ($Input4, "")
            MsgBox (0,"Logged", "Checkout Information has been Logged!")
        Case $Buttor2
            IniWrite (@ScriptDir & "\Return.ini","",$i,@CRLF &"  Name: "&GUICTrlRead($Inpur1)&"  Name of book: "&GUICTrlRead($Inpur3)&"  Period: "&GUICTrlRead($Inpur2)&"  Date Returned: "&GUICTrlRead($Inpur4))
            GUICtrlSetData ($Inpur1,"")
            GUICtrlSetData ($Inpur3,"")
            GUICtrlSetData ($Inpur2,"")
            GUICtrlSetData ($Inpur4,"")
            MsgBox (0,"Logged", "Return Information has been Logged!")
            
        Case $XIcon[1] 
            GUIDelete()

        Case $XIcon[2]
            GUISetState(@SW_MINIMIZE)
            
    EndSwitch
WEnd

[center]Kesne's Bar & Grill[/center]

Share this post


Link to post
Share on other sites

For $i = 1 To 10000

Next

is the same as $i = 10000 except it has a loop that is doing nothing

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

How can i fix it?


[center]Kesne's Bar & Grill[/center]

Share this post


Link to post
Share on other sites

1

While 1

$msg = GUIGetMsg()

Switch $msg

Case $Button2

IniWrite (@ScriptDir & "\CheckedOut.ini","",$i," Name: "&GUICTrlRead($Input1)&" Period: "&GUICTrlRead($Input2)&" Name of book: "&GUICTrlRead($Input3)&" Date Checked Out: "&GUICTrlRead($Input4))

GUICtrlSetData ($Input1,"")

GUICtrlSetData ($Input2,"")

GUICtrlSetData ($Input3,"")

GUICtrlSetData ($Input4, "")

MsgBox (0,"Logged", "Checkout Information has been Logged!")

Case $Buttor2

they should not be the same name

2

$i = 0

; or $i = ( read how many lies are in the file )

While 1

$msg = GUIGetMsg()

Switch $msg

Case $Button2

$i += 1

IniWrite (@ScriptDir & "\CheckedOut.ini","",$i," Name: "&GUICTrlRead($Input1)&" Period: "&GUICTrlRead($Input2)&" Name of book: "&GUICTrlRead($Input3)&" Date Checked Out: "&GUICTrlRead($Input4))

GUICtrlSetData ($Input1,"")

GUICtrlSetData ($Input2,"")

GUICtrlSetData ($Input3,"")

GUICtrlSetData ($Input4, "")

MsgBox (0,"Logged", "Checkout Information has been Logged!")

Case $Buttor2***** change name

$i += 1

IniWrite (@ScriptDir & "\Return.ini","",$i,@CRLF &" Name: "&GUICTrlRead($Inpur1)&" Name of book: "&GUICTrlRead($Inpur3)&" Period: "&GUICTrlRead($Inpur2)&" Date Returned: "&GUICTrlRead($Inpur4))

GUICtrlSetData ($

Just ideas

8)


NEWHeader1.png

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  
Followers 0