Lempke Posted October 11, 2006 Share Posted October 11, 2006 This doesn't work and I don't know why. Select Case $Location = "AAA" $LocCode = 1 Case $Location = "BBB" $LocCode = 2 Case $Location = "CCC" $LocCode = 3 Case $Location = "DD1" Or "DD2" Or "DD3" $LocCode = 4 Case $Location = "EEE" $LocCode = 5 EndSelect IniWrite("C:\test.ini", "USERDATA", "LocCode", $LocCode) When the value is EEE is still returns my with code 4 Link to comment Share on other sites More sharing options...
MHz Posted October 11, 2006 Share Posted October 11, 2006 Select Case $Location = "AAA" $LocCode = 1 Case $Location = "BBB" $LocCode = 2 Case $Location = "CCC" $LocCode = 3 Case $Location = "DD1" Or $Location = "DD2" Or $Location = "DD3" $LocCode = 4 Case $Location = "EEE" $LocCode = 5 EndSelect IniWrite("C:\test.ini", "USERDATA", "LocCode", $LocCode) oÝ÷ Úî±ä°×!jëh×6 Switch $Location Case "AAA" $LocCode = 1 Case "BBB" $LocCode = 2 Case "CCC" $LocCode = 3 Case "DD1", "DD2", "DD3" $LocCode = 4 Case "EEE" $LocCode = 5 EndSwitch IniWrite("C:\test.ini", "USERDATA", "LocCode", $LocCode) Link to comment Share on other sites More sharing options...
Lempke Posted October 11, 2006 Author Share Posted October 11, 2006 or use Switch Switch $Location Case "AAA" $LocCode = 1 Case "BBB" $LocCode = 2 Case "CCC" $LocCode = 3 Case "DD1", "DD2", "DD3" $LocCode = 4 Case "EEE" $LocCode = 5 EndSwitch IniWrite("C:\test.ini", "USERDATA", "LocCode", $LocCode) Switch didn't know that one. I have to add a lot more locations, so I'm gonna look into that one. Thx Mhz Link to comment Share on other sites More sharing options...
Lempke Posted October 11, 2006 Author Share Posted October 11, 2006 (edited) Is this in the manual ?? Can't find Switch or EndSwitch??? Edited October 11, 2006 by Lempke Link to comment Share on other sites More sharing options...
MHz Posted October 11, 2006 Share Posted October 11, 2006 Yes, it is in the AutoItv3.2.0.1 public release Helpfilehttp://www.autoitscript.com/autoit3/docs/keywords/Switch.htm Link to comment Share on other sites More sharing options...
Lempke Posted October 11, 2006 Author Share Posted October 11, 2006 Yes, it is in the AutoItv3.2.0.1 public release Helpfilehttp://www.autoitscript.com/autoit3/docs/keywords/Switch.htm Didn't install the latest version :"> 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