I'm surprised that more people don't use MortScript. It is a very useful scripting language for mobile devices. It is freeware and can handle some pretty complex tasks with a few lines of code.
Case in point. I was able to write a simple script to monitor notifications and turn on the led blink when any are active.
MortScript can read and write to the registry, execute programs and subroutines and functions, send keystrokes and mouseclicks to applications, perform file manipulation and a lot more.
There is a new version 4.0 available here.
http://www.sto-helit.de/index.php?mo...st&category=17
Documentations is here.
http://www.sto-helit.de/downloads/po...4.0-Manual.pdf
Example:
Code:
#
# NLED.mscr - Monitors notifications and turns on and off the notification LED accordingly.
#
# check dependencies
If ( NOT FileExists( "\Windows\LEDUp.exe" ) )
Message ( "Installation of LEDUp.exe is required! Exiting...", "NLED script" )
Exit
EndIf
# initialize variables
LedOn = FALSE
Notify = FALSE
# start notification check loop
While ( 1 )
# check the registry for any notifications
Notify = RegValueExists( "HKLM", "System\State\Shell\Notifications\Active", "CLSID" )
# turn on the led if any notifications are pending. Keep turning on each iteration since
# the OS turns it off whenever there is a new notification.
If ( Notify )
RunWait( "\Windows\LEDUp.exe", "0 1" )
LedOn = TRUE
EndIf
# turn off the led if no notifications are pending
If ( LedOn && NOT Notify )
RunWait( "\Windows\LEDUp.exe", "0 0" )
LedOn = FALSE
EndIf
# wait 5 seconds
Sleep( 5000 )
EndWhile
People should post useful scripts they write to this thread for others to use. Attached is the above code zipped up. It requires installation of LEDUp.exe also attached. Install MortScript, LEDUp and copy the script to your device. Paste a shortcut of the script to \Windows\Startup to have it start at boot if it works for you.
Edit: Changed sleep to 5 seconds to activate the led before the keyguard puts the device to sleep when locked.