View Single Post
Old 10-13-2018, 08:02 PM   #1
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Lazy Sunday idea - launching scripts/apps from Nickel

WARNING: The following post is a Lazy Sunday Idea. Something may or may not come of it.

So, this post sparked off an idea about a possible method of launching scripts or programs from within Nickel, without needing to monitor files.

The idea is as follows:
  1. The hypothetical launcher (HL) is started from the rc5 startup script.
  2. It then periodically searches for the battery icon. Once found, the position and (partial) outline is obtained. This outline (a three segment polyline perhaps?) and it's posistion does not appear to change throughout nickel, at least on my H2O and firmware.
  3. When the battery icon is detected onscreen, the status bar is showing. Draw the HL icon in around the centre of the status bar. Touching said icon will launch the launcher, where it grabs exclusive touch input etc.
  4. Unless the launcher has been invoked, we simply wait for touch events. When a touch event is detected, check for the existance of the battery icon. If found, see above step. If not found, disable/remove HL icon, and wait for next touch.
  5. So long as the battery icon does not change position, finding it should be a trivial, quick and non cpu intensive task. A couple of memory compares may be enough.

So, there's my idea for the day. Please feel free to poke holes in it, or suggest improvements.

If someone wants to run with it, go ahead. Otherwise, I may give it a go myself.
sherman is offline   Reply With Quote