KenNichols Posted May 6, 2009 Posted May 6, 2009 Is there a way to do this? I call on the values in multiple Functions! CODEGlobal $1add = GUICtrlRead($txt1Add) Global $1city = GUICtrlRead($txt1city) Global $1state = GUICtrlRead($txt1state) Global $2add = GUICtrlRead($txt2Add) Global $2city = GUICtrlRead($txt2city) Global $2state = GUICtrlRead($txt2state) Global $3add = GUICtrlRead($txt3Add) Global $3city = GUICtrlRead($txt3city) Global $3state = GUICtrlRead($txt3state) Global $4add = GUICtrlRead($txt4Add) Global $4city = GUICtrlRead($txt4city) Global $4state = GUICtrlRead($txt4state) Global $5add = GUICtrlRead($txt5Add) Global $5city = GUICtrlRead($txt5city) Global $5state = GUICtrlRead($txt5state) Global $6add = GUICtrlRead($txt6Add) Global $6city = GUICtrlRead($txt6city) Global $6state = GUICtrlRead($txt6state) Global $7add = GUICtrlRead($txt7Add) Global $7city = GUICtrlRead($txt7city) Global $7state = GUICtrlRead($txt7state) Global $8add = GUICtrlRead($txt8Add) Global $8city = GUICtrlRead($txt8city) Global $8state = GUICtrlRead($txt8state) Global $9add = GUICtrlRead($txt9Add) Global $9city = GUICtrlRead($txt9city) Global $9state = GUICtrlRead($txt9state) [topic="21048"]New to AutoIt? Check out AutoIt 1-2-3![/topic] Need to make a GUI? You NEED KODA FormDesigner!
Mat Posted May 6, 2009 Posted May 6, 2009 that code is fine from a syntax point of veiw. What are you actually trying to do?helpfile sais:; Example 1 - Declaring variablesDim $x, $y = 23, $zGlobal $_PI = 3.14159, $RADIUSLocal $_daysWorking = 5 AutoIt Project Listing
Valuater Posted May 6, 2009 Posted May 6, 2009 Like this... Global $add[10], $city[10], $state[10] Global $txtadd[10], $txtcity[10], $txtstate[10] ;Create the controls $txtadd[1] = GUICtrl.... ;Read the controls For $x = 1 To UBound($state) - 1 $add[$x] = GUICtrlRead($txtadd[$x]) $city[$x] = GUICtrlRead($txtcity[$x]) $state[$x] = GUICtrlRead($txtstate[$x]) Next 8)
KenNichols Posted May 6, 2009 Author Posted May 6, 2009 Like this... Global $add[10], $city[10], $state[10] Global $txtadd[10], $txtcity[10], $txtstate[10] ;Create the controls $txtadd[1] = GUICtrl.... ;Read the controls For $x = 1 To UBound($state) - 1 $add[$x] = GUICtrlRead($txtadd[$x]) $city[$x] = GUICtrlRead($txtcity[$x]) $state[$x] = GUICtrlRead($txtstate[$x]) Next 8) Is there a way to do it without adding GUICtrlRead into the function? [topic="21048"]New to AutoIt? Check out AutoIt 1-2-3![/topic] Need to make a GUI? You NEED KODA FormDesigner!
Valuater Posted May 6, 2009 Posted May 6, 2009 (edited) Is there a way to do it without adding GUICtrlRead into the function?Yes!!..??? ...What do you want to do?8) Edited May 6, 2009 by Valuater
KenNichols Posted May 6, 2009 Author Posted May 6, 2009 Yes!!..??? ...What do you want to do?8)Thanks Valuater!After figuring out how I use what you posted. I learned all I had to do was add them to the While 1.Thanks again and sorry! I don't know why I didn't see that before.PS. Your way is MUCH cleaner! [topic="21048"]New to AutoIt? Check out AutoIt 1-2-3![/topic] Need to make a GUI? You NEED KODA FormDesigner!
Valuater Posted May 6, 2009 Posted May 6, 2009 Thanks Valuater!After figuring out how I use what you posted. I learned all I had to do was add them to the While 1.Thanks again and sorry! I don't know why I didn't see that before.PS. Your way is MUCH cleaner!Welcome!!... Glad it helped!8)
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