Been using easygui in python to make gui boxes for various different system applications for windows over the past few days. What I want to know is, why doesn't my code work? It looks the same as the code that was working before? The program is a game launcher, and I shall be making one identical to this but working (with different, LAN compatible games) for people to select the game from the list. Looked on stack overflow and found somebody with a similar issue, however I don't believe his resolution would apply to my script. Will post code below,
thank you,
Matthew
import easygui as eg
import os
def menu():
msg="Please select a game:"
title="Select Game!"
choices=["Batman Arkham City", "Tomb Raider", "TESV Skyrim", "State of decay - Early Access", "Critical Strike Portable", "Terraria", "Doom", "Halo","Minecraft"]
reply=eg.buttonbox(msg,title,choices)
if choices=="Batman Arkham City":
batman()
elif choices=="Tomb Raider":
tomb()
elif choices=="TESV Skyrim":
skyrim()
elif choices=="State of decay - Early Access":
state()
elif choices=="Critical Strike Portable":
crs()
elif choices=="Terraria":
terr()
elif choices=="Doom":
doom()
elif choices=="Halo":
halo()
elif choices=="Minecraft":
minecraft()
def batman():
os.system('"C:\Program Files (x86)\Black_Box\Batman Arkham City\Binaries\Win32\BatmanAC.exe"')
menu()
def tomb():
os.system('"C:\Program Files (x86)\Tomb Raider\TombRaider.exe"')
menu()
def skyrim():
os.system('"C:\Program Files (x86)\The Elder Scrolls V Skyrim\SkyrimLauncher.exe"')
menu()
def state():
os.system('"C:\Games\State of Decay Early Access\StateOfDecay.exe"')
menu()
def crs():
os.system('"C:\Program Files (x86)\CS Portable\a.exe"')
menu()
def terr():
os.system('"C:\Games\Terraria\Terraria.exe"')
menu()
def doom():
os.system('"C:\DOOMWADS\doom.wad"')
menu()
def halo():
os.system('"C:\Program Files (x86)\Halo Combat Evolved\Halo.exe"')
menu()
def minecraft():
os.system('"C:\Games\minecraft.exe"')
menu()
menu()
Stack overflow has messed up my indents! Please assume these are correct as they are.