I pretty much create tools from scripts, create a tool in my toolbox, and use the Parameter setup in for the tool to create combo boxes. I just created one today for one of my tools (for creating some mosaic data bases).
you can set a default if you want...I didn't want one. My list of values:
Then accessing in my script....
import arcpy
import sys
def myMsgs(message):
arcpy.AddMessage("{0}".format(message))
print("{0}".format(message) )
typeList = arcpy.GetParameterAsText(6)
myMsgs(" - the typeList {0}".format(typeList))
if not typeList:
#mdList = ["rgb", "DEMEllipsoidal"] #, "DEMEEllipsoidal", "DEMOrthometric", "pan", "cir"]
#mdList = ["cir", "DEMEllipsoidal", "DEMOrthometric"]
myMsgs("Can run manually by modifying list and uncommenting one of the above.")
sys.exit()
else:
mdList = typeList.split(";")
myMsgs(" --- the mdList is {0}\n".format(mdList))
#sys.exit()
Sorry this is a bit messy. This is a work in progress and just added that in (and was testing) for the last item on the list. But wanted to make it available for other in my org in the future.
Note sure if this will help or not, but it's there.
(Funny, I couldn't get this to work last week and it was easy today.....must have been the cold med fuzziness)
edit...forgot to add a pic of the UI