|
Post by AnkuLua on Aug 9, 2016 3:42:45 GMT
Many users ask about the script for turning screen for power saving. We hear you.
Here comes the script.
keyevent(26) -- power, turn off screen wait(3) keyevent(82) --unlock type("1234") --passcode, change to your PIN, remove it if no lock keyevent(66) -- enter, remove it if no lock
|
|
|
Post by AnkuLua on Aug 9, 2016 12:28:29 GMT
Just find that it doesn't work for all devices. Wish you luck.
|
|
Kako
Contributors
Posts: 105
|
Post by Kako on Aug 9, 2016 19:01:36 GMT
Good job! I also noticed you added some functions to set the screen brightness, correct? Cause turning the screen off this way will pause the game & script I assume
|
|
|
Post by AnkuLua on Aug 9, 2016 22:39:13 GMT
Yes. During the normal script running, you can always use setBrightness(int) function. You can turn off the screen for a while when out of energy (in game not your device )
|
|