Hello all,
Is there a way to exit the python shell to the main screen of the device after it does an execution for 2nd and 3rd editions?
Thank you
Hello all,
Is there a way to exit the python shell to the main screen of the device after it does an execution for 2nd and 3rd editions?
Thank you
Gargi Das- http://gargidas.blogsot.com
Forum Nokia Python Wiki
Learn Python at http://mobapps.org/PyS60
Call the quit function when the execution finishes.
If you mean the home screen (by main screen) of the device, you would need to simulate the red key! Beware: Simulating the red key might also terminate your application in 3r edition (Use envy extension, if needed to disable this).
Pankaj Nathani
www.croozeus.com
@gaba88
If there is a way to do it programatically without the user having to press any button. For example if i wanted to call it by e32.start_exe(), how would i call the .app file?
@croozeus
Yes, the home screen is the main screen. I did try to use red key, but it doesn't work. I tried to simulate the red key by the following:
it did not work, tho it did for the other simulation of keys such as right soft keypress. I did try to make it as (EKeyNo, EKeyNo) but that did not work as well. Would it be useful if i exchanged the values as their representative numbers?Code:from key_codes import * import keypress keypress.simulate_key(EKeyNo, EScancodeNo)
I would like to first try on the 2nd edition then on the 3rd. Thank you
Try this to simulate the red key:
Code:keypress.send_raw_event(keypress.EKeyDown,EScancodeNo) keypress.send_raw_event(keypress.EKeyUp,EScancodeNo)
@bogdan.galiceanu
the raw event is for 3rd edition right? because i tried it on the second edition and i get an error.
says
keypress.send_raw_event(keypress.EKeyDown, EScancodeNo) attributeError: 'module' object has no attribute 'send_raw_event'
This is the code am trying to simply test on
I tried the suggestedCode:import keypress from key_codes import * print "Hello"
which gave the error above. I have installed all the required. Different key simulations works fine except the red key.Code:keypress.send_raw_event(keypress.EKeyDown,EScancodeNo) keypress.send_raw_event(keypress.EKeyUp,EScancodeNo)
BTW, for 2nd edition phones I'm using keypress V.1.02, Should i use a newer version?
Last edited by eng_electric; 2009-07-23 at 16:45.
Hello all again,
I was trying the menu key and found it out dont work for me. I'm testing it on nokia 7610 and the code is:
Does it work on higher second editions? can someone who have FP1 2nd edition confirm this. Thank youCode:from key_codes import * import keypress, e32 keypress.simulate_key(EKeyMenu,EScancodeMenu) e32.ao_sleep(1)