Is there a way to loop back to the beginning and keep the already entered data in the GUI Input boxes? I can GUIDelete and start a new GUI but all the typed data has to be redone. Here is a sample.
#Include <GuiConstants.au3> Dim $msg,$okbutton,$cancelbutton,$objOU,$intAccValue,$strGroup1,$strGroup2 Dim $strFirstName,$strLastName,$strUserName,$strUserName2,$strPassword,$strDescription,$strContainer Dim $Combo,$Duration Do $Form1 = GuiCreate("", 300, 300) GUISetBkColor(0xA6CAF0) GuiCtrlCreateLabel("First Name:", 50, 10) $strFirstName = GuiCtrlCreateInput("", 50, 25, 200, 20) GUICtrlSetState ( $okbutton, $GUI_FOCUS ) GuiSetState() $okbutton = GUICtrlCreateButton ("OK",75,240,50,20) $cancelbutton = GUICtrlCreateButton ("Cancel",175,240,50,20) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton Exit Case $msg = $okbutton $strFirstName = GUICtrlRead($strFirstName) ExitLoop EndSelect Wend $len = StringLen($strFirstName) If $len > "20" then MsgBox(0, "ERROR Name to long", $strFirstName & " can't be over 20 characters." & @CRLF & "Total: " & $len) ;Exit GUIDelete($Form1) EndIf Until $len < "20" MsgBox(0, "Done", "")
I want to do something , after wait 2 min and again do same thing
But I do do not want with sleep, it must be timer
How I do this ?
Is it possible to get a variable on your For..Next loop?
Local $Lines1 = _FileCountLines(C:\temp\test.txt) Local $linesToCount2 = $Lines1 + 2 $var = Number($linesToCount2) For $count = 1 To _FileCountLines($FileRead2) Step 1 For $i = $var To $count Next ;Code does stuff here Next Somehow my code doesn't work even though I thought I could convert the variable to a Integer / Number.
This code I posted above does not move to the next value.
But the code below does... why is that?
For $count = 1 To _FileCountLines($FileRead2) Step 1 For $i = 2 To $count Next ;Code does stuff here Next
Why is the For loop resetting itself?
Is it because the program does not cache the variable and needs to keep on acquiring this variable each time?
If so , how would you make this variable static?
Hi. I can open the editor with out problems but I can not compile because it is placed on another partition diferent from C.
Can you provide an update of this bug?
Some functions of my script are running slowly. Very slow. What is the reason?