Jump to content

While Loop


iceberg
 Share

Recommended Posts

Hi,

#include <GuiConstants.au3>

GuiCreate("Timings", 222, 125,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Ok = GuiCtrlCreateButton("OK", 20, 80, 80, 30)
$Cancel = GuiCtrlCreateButton("Cancel", 120, 80, 80, 30)
$Name = GuiCtrlCreateLabel("Please enter timing details for ", 10, 10, 210, 20)
$Min = GuiCtrlCreateInput("", 10, 40, 20, 20)
$Min1 = GuiCtrlCreateLabel("min", 30, 45, 30, 20)
$Sec = GuiCtrlCreateInput("", 60, 40, 20, 20)
$Sec1 = GuiCtrlCreateLabel("sec", 80, 45, 30, 20)
$Ms = GuiCtrlCreateInput("", 110, 40, 20, 20)
$Ms1 = GuiCtrlCreateLabel("ms", 130, 45, 30, 20)

GuiSetState()

While 1
    
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Cancel
        ExitLoop
    Case $msg = $Ok
        $line = FileReadLine("p.txt")
        $Name2 = GuiCtrlCreateLabel("Please enter timing details for " & $line, 10, 10, 210, 20)
    Case Else
    ;;;
    EndSelect
WEnd
Exit

You need a text file called p.tx in the script directory. It is supposed to contain names of ppl. But the problem I have is that the name doesn't go on to the next one when I hit the OK button. Can someone pls help me out with this?

Thanks.

mouse not found....scroll any mouse to continue.

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...