Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # App launcher script by gauravssnl
- import os,glob,e32,appuifw
- lk=e32.Ao_lock()
- def q():lk.signal()
- appuifw.app.exit_key_handler=q
- timer=e32.Ao_timer()
- t= 0.5
- def main():
- global exe
- exe1=glob.glob("C:\\sys\\bin\\*.exe")
- if os.path.exists("E:\\sys\\bin\\"):
- exe2=glob.glob("E:\\sys\\bin\\*.exe")
- exe=exe1+exe2
- data=[u"%s"%f for f in exe]
- else:
- exe=exe1
- data=[u"%s"%f for f in exe]
- global list
- list=appuifw.Listbox(data,handle)
- bd=appuifw.app.body=list
- appuifw.app.title=u"App Launcher"
- appuifw.app.menu=[(u"About",about),(u"Exit",q)]
- def handle():
- global list,exe
- cur=list.current()
- try:
- appuifw.app.title=u"Launching app..."
- e32.ao_sleep( 0.5)
- e32.start_exe(exe[cur], "Gaurav")
- main()
- except:
- appuifw.note(u"Sorry that app can't be started")
- def about():
- appuifw.note(u"Developer:gauravssnl")
- main()
- lk.wait()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement