Flash light

Dm114

Well-known member
One of my 1st macros years ago (updated). I use it to switch the light ON (by pressing Home button) or flash ON/OFF on missed calls, for instance...

It switches flash light ON/OFF and runs when content of STRING GLOBAL variable "FLASH" changes. Its content can be:
• empty → to switch OFF the flash light and STOP the macro
• 1 integer number for the flash light ON duration
• an optional 2nd integer number for the flash light OFF duration. It has to be separated from the 1st number by any character (space, comma, dot, dash, slash...)

So, to run this macro and activate flash light, just set FLASH global string variable to appropriate value anywhere from outside this macro. Don't forget to stop flashing by erasing FLASH content.

👉 Durations are in 10th of seconds, from 0 to 600 (i.e. up to 60s = 1 minute)

ℹ️ 0 (zero) for ON duration will switch on the light for 5 minutes (unless FLASH variable becomes empty in the meanwhile)

ℹ️ If OFF duration doesn't exist or is set to 0 (zero), it will last as long as ON duration

For example:
• FLASH=5 will flash 0.5s ON and 0.5s OFF
• FLASH=1,10 will flash 0.1s ON and 1s OFF

 
Top