zellis Posted May 9, 2006 Share Posted May 9, 2006 (edited) i have a gui that contains 4 sets of raido buttons and 2 drop down boxes. the program works fine but the user must re-enter the data into the GUI every time the program complets. so i made a "load from file" feature that reads a pre-set configuration that the user can load to configur the GUI. now i can get the GUI to automaticly load all the raido buttons from file, but i cant seem to load values into the drop down boxes. so basicly what im trying to do is automaticly configure a GUI from file. here is some of my codehere is part of my GUI where i create the drop down boxremovedhere is the case where i load from file. see my notes in the code where i can not make it worki removed the code that was hereany help would be great!!! thankyou.shawn Edited May 15, 2006 by zellis Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted May 9, 2006 Moderators Share Posted May 9, 2006 The first thing I see is that you are reassigning the variables you are using for your combo boxes with the inireads. If you could post your whole code it would be easier to help you. Link to comment Share on other sites More sharing options...
zellis Posted May 9, 2006 Author Share Posted May 9, 2006 (edited) Edited May 9, 2006 by zellis Link to comment Share on other sites More sharing options...
zellis Posted May 9, 2006 Author Share Posted May 9, 2006 (edited) the code is too large to post all of it, here is the .au3 file, RENAME the "IPU_CONFIGURATION_TOOL2.JPG.au3 to IPU_CONFIGURATION_TOOL2.JPG" to make it work right, create this path and copy the jpg file into it. then run the .au3 "c:\program files\IPU Configurator\IPU_CONFIGURATION_TOOL2.JPG",10,0, 470, 130);creating GUI artwork thanks Edited May 15, 2006 by zellis Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted May 10, 2006 Moderators Share Posted May 10, 2006 the code is too large to post all of it, here is the .au3 file, RENAME the "IPU_CONFIGURATION_TOOL2.JPG.au3 to IPU_CONFIGURATION_TOOL2.JPG" to make it work right, create this path and copy the jpg file into it. then run the .au3 "c:\program files\IPU Configurator\IPU_CONFIGURATION_TOOL2.JPG",10,0, 470, 130);creating GUI artwork thanksI don't have a config ini file to test it with, but see it this works. Link to comment Share on other sites More sharing options...
zellis Posted May 11, 2006 Author Share Posted May 11, 2006 thankyou! it works, well at least one of the combo boxes does, but ill fix the other one later. i an mot farmilular with the "switch" function you used in replace of "select" for select case. i cannot find any usage for it online, and my editor does not either... i get a explorer error , page not found using the function popup help on sciTC editor. i even updated to the latest revs too, can you tell me the usage on the switch function? thanks Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted May 11, 2006 Moderators Share Posted May 11, 2006 thankyou! it works, well at least one of the combo boxes does, but ill fix the other one later. i an mot farmilular with the "switch" function you used in replace of "select" for select case. i cannot find any usage for it online, and my editor does not either... i get a explorer error , page not found using the function popup help on sciTC editor. i even updated to the latest revs too, can you tell me the usage on the switch function? thanksSwitch requires the beta version. I can't explain Switch very well, but you can save a lot of code by using it. For example using Select: Select Case @HOUR = 6 Or 7 Or 8 Or 9 Or 10 Or 11 $msg = "Good Morning" Case @HOUR = 12 Or 13 Or 14 Or 15 Or 16 Or 17 $msg = "Good Afternoon" Case @HOUR = 18 Or 19 Or 20 Or 21 $msg = "Good Evening" Case Else $msg = "What are you still doing up?" EndSelect MsgBox(0, Default, $msg) The same outcome using Switch Switch @HOUR Case 6 To 11 $msg = "Good Morning" Case 12 To 17 $msg = "Good Afternoon" Case 18 To 21 $msg = "Good Evening" Case Else $msg = "What are you still doing up?" EndSwitch MsgBox(0, Default, $msg) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 11, 2006 Moderators Share Posted May 11, 2006 Switch requires the beta version. I can't explain Switch very well, but you can save a lot of code by using it. For example using Select: Select Case @HOUR = 6 Or 7 Or 8 Or 9 Or 10 Or 11 $msg = "Good Morning" Case @HOUR = 12 Or 13 Or 14 Or 15 Or 16 Or 17 $msg = "Good Afternoon" Case @HOUR = 18 Or 19 Or 20 Or 21 $msg = "Good Evening" Case Else $msg = "What are you still doing up?" EndSelect MsgBox(0, Default, $msg) The same outcome using Switch Switch @HOUR Case 6 To 11 $msg = "Good Morning" Case 12 To 17 $msg = "Good Afternoon" Case 18 To 21 $msg = "Good Evening" Case Else $msg = "What are you still doing up?" EndSwitch MsgBox(0, Default, $msg)Actually if you use the right syntax, it explains it even better on why switch is sometimes favored in certain situations:Select Case @HOUR = 6 Or @HOUR = 7 Or @HOUR = 8 Or @HOUR = 9 Or @HOUR = 10 Or @HOUR = 11 $msg = "Good Morning" Case @HOUR = 12 Or @HOUR = 13 Or @HOUR = 14 Or @HOUR = 15 Or @HOUR = 16 Or @HOUR = 17 $msg = "Good Afternoon" Case @HOUR = 18 Or @HOUR = 19 Or @HOUR = 20 Or @HOUR = 21 $msg = "Good Evening" Case Else $msg = "What are you still doing up?" EndSelect MsgBox(0, Default, $msg)Can get cumbersome to say the least. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted May 11, 2006 Moderators Share Posted May 11, 2006 Actually if you use the right syntax, it explains it even better on why switch is sometimes favored in certain situations:Select Case @HOUR = 6 Or @HOUR = 7 Or @HOUR = 8 Or @HOUR = 9 Or @HOUR = 10 Or @HOUR = 11 $msg = "Good Morning" Case @HOUR = 12 Or @HOUR = 13 Or @HOUR = 14 Or @HOUR = 15 Or @HOUR = 16 Or @HOUR = 17 $msg = "Good Afternoon" Case @HOUR = 18 Or @HOUR = 19 Or @HOUR = 20 Or @HOUR = 21 $msg = "Good Evening" Case Else $msg = "What are you still doing up?" EndSelect MsgBox(0, Default, $msg)Can get cumbersome to say the least.Thanks for catching that SmOke_N. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 11, 2006 Moderators Share Posted May 11, 2006 Thanks for catching that SmOke_N. No worries, I know you were concentrating on explaining the difference with an example, not providing a syntax explination . Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
zellis Posted May 11, 2006 Author Share Posted May 11, 2006 i have the latest beta version, but ...oh i found it, its not located under the regular help screen, but under the beta help screen!... thanks again 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