View Single Post
Old 10-21-2013, 01:06 PM   #16
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by Aeris View Post
Do you think guys that it would be easy, for example, with a similar approach, turn the wifi tray icon into a switch for the wifi off/on property? Inejcting some javascript as in this case... or javascript can't launch lipc commands?
It's possible to access LIPC from pillow app and it's possible to handle tap (as a standard click event) with JavaScript. So overall answer is yes.

This code executed in context of default_status_bar should work as a wireless switch.
Code:
var invertedState = (ConnectionState.connectionOnOff ? 0 : 1);
nativeBridge.setIntLipcProperty("com.lab126.cmd", "wirelessEnable", invertedState);
eureka is offline   Reply With Quote