| Reply | « Previous Thread | Next Thread » |
|
hello everyone!!
![]() there is a instruction in python to switch on/off my smartphone? if there isn't, where i can look for make this? thanks in advance! ![]() |
|
There's a key undocumented in key_codes.py !
It's PowerOff key=EKeyDevice2 ! Add this line to key_codes.py file EKeyPowerOff = 63556 and now use keypress module v1.02 Code:
from key_codes import * import keypress # Display "power off and profiles menu !" keypress.simulate_key(EKeyPowerOff,EKeyPowerOff) pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 ! pys60 extension modules on http://cyke64.googlepages.com/ |
|
Quote:
![]() |
|
This may sound trivial but how does one add that line to a protected file? Or do we need to package an SIS to replace it?
|
|
Hi ccmroy,
Its not a protected file! Anyways you can also use the SWITCHOFF module... http://discussion.forum.nokia.com/fo...d.php?t=124197 Haven't tested it yet but I guess you can try it! BR Croozeus |
|
Its strange, what am I doing wrong? I tried using Ped to edit and save but gives me the error "Cannot save file". Same deal with other editors. Just to confirm, is the key_codes.py in the C:\resource?
rapidshare does not work well thru my ISP, anywhere else I can download the switchoff module? I am trying to make my phone turnoff at scheduled time daily. Any chance anybody already did it so I won't need to reinvent the wheel? Thanks for your help. ![]()
Last edited by ccmroy : 2008-01-09 at 13:19.
|
|
Hi again, anybody can help as above? Thanks.
|
|
Hello,
Actually, since the line that you need to add just defines a new variable, you can write it straight into your script: Code:
from key_codes import * import keypress EKeyPowerOff = 63556 # Display "power off and profiles menu !" keypress.simulate_key(EKeyPowerOff,EKeyPowerOff) ![]() Best Regards Richard Nokia E66 PyS60 1.4.4 final |
|
Hey ccmroy,
Yes key_codes.py is in C:/Resource folder on 3rd Edition devices. I had previously tested this trick on 6680 2nd Edition FP2 device.Worked Fine! ![]() Today I tried to edit it on my N95 adn your right it a protected file on 3rd edition devices... ![]() Quote:
SWITCHOFF module I guess it is not uploaded correctly as It shows 0kb! Best Regards Croozeus |
|
Thanks Rich. But when I run that script, it only quits the python interpreter. I also converted it to sis and it didn't work. Any idea why?
|
|
Oops, it does the same on my phone too
sorry, I dont know why.Best Regards Richard Nokia E66 PyS60 1.4.4 final |
|
Quote:
![]() I checked out xprofile and it doesn't offer any way to shutdown the phone; it can only switch profiles. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| How Switch On/Off T9 dictionary . | debasish1234 | General Symbian C++ | 2 | 2009-02-04 13:08 |
| Circuit Switch & Packet Switch at the same time on Series60 Platform | TrickLo | Symbian Networking & Messaging | 9 | 2006-04-09 16:36 |
| Switch on/off local Bluetooth services | fabrizioe | General Symbian C++ | 1 | 2004-12-23 09:01 |
| Why master-slave switch is broken in 6600? | jhnlmn | Bluetooth Technology | 3 | 2004-02-10 15:04 |
| Sample electronic on/off switch via SMS | wmasia | Nokia M2M | 1 | 2002-07-19 11:02 |