strate Posted November 17, 2004 Share Posted November 17, 2004 What I want to do is make it so I can read all of the first Select Case statements into the program before it really starts running (in the main loop). This way the program will run faster. The problem is the variable $INI is the same for each INIREAD so I only receive the last read. I want to use the code in the second half one time instead of repeating it 29 times (each with a new variable to match the case) Is it possible to do something like $INI&$C = IniRead( "H:\label Verification\18.14 setup.ini", "Cursor Cord", $INIWRITEINI, "Error" ) The first part here has 29 different cases but I thought two would be ok for the example. For $C = 1 to 2 Select Case $C = 1 $INIWRITEINI = "EMPLOYEE" $INI = IniRead( "H:\label Verification\18.14 setup.ini", "Cursor Cord", $INIWRITEINI, "Error" ) Case $C = 2 $INIWRITEINI = "EffectiveDate" $INI = IniRead( "H:\label Verification\18.14 setup.ini", "Cursor Cord", $INIWRITEINI, "Error" ) EndSelect MsgBox(0,$INIWRITEINI,$INI) Next This next part is later in the process. $INISPLIT = stringsplit($INI,",") MsgBox(0,$INIWRITEINI,"X: "&$INISPLIT[1]& " Y: "&$INISPLIT[2]) ;~Checks to see that the caret point matches what is on file for $INIREAD. $d = WinGetCaretPos() Do $Count=$Count+1 If $Count = 10 Then While 1 ToolTip ( "QAD is running slow."&@CR&"Please wait while production is recorded.",1,1) Sleep(300) If $d[0] = $INISPLIT[1] AND $d[1] = $INISPLIT[2] Then ExitLoop(1) EndIf Wend ToolTip ( " Follow all prompts."&@CR&"If you believe you are having a problem"&@CR&" noify your supervisor.",$x,$y) EndIf Sleep(500) until $d[0] = $INISPLIT[1] AND $d[1] = $INISPLIT[2] Does any of that make sense? Thank you INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
CyberSlug Posted November 18, 2004 Share Posted November 18, 2004 (edited) Assign( "INI" & $C , IniRead("H:\label Verification\18.14 setup.ini","Cursor Cord", $INIWRITEINI,"Error") )Maybe you should use a two-dimensional array instead?On second thought, why do you even have a loop? Why not say:Dim $INI[30] $INI[0] = IniRead( "H:\label Verification\18.14 setup.ini", "Cursor Cord", "EMPLOYEE", "Error" ) $INI[1] = IniRead( "H:\label Verification\18.14 setup.ini", "Cursor Cord", "EfectiveDate", "Error" ) Edited November 18, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
strate Posted November 18, 2004 Author Share Posted November 18, 2004 Assign( "INI" & $C , IniRead("H:\label Verification\18.14 setup.ini","Cursor Cord", $INIWRITEINI,"Error") )Maybe you should use a two-dimensional array instead?On second thought, why do you even have a loop? Why not say:Dim $INI[30] $INI[0] = IniRead( "H:\label Verification\18.14 setup.ini", "Cursor Cord", "EMPLOYEE", "Error" ) $INI[1] = IniRead( "H:\label Verification\18.14 setup.ini", "Cursor Cord", "EfectiveDate", "Error" )<{POST_SNAPBACK}>I tried your second method and it works great thank you for your help. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now