Quote:
Originally Posted by Carmelocotonto
Hi. Can I use this one into 'reader.lua' when I am going to run koreader?.
This is I have got now into 'reader.lua' while I run a file.sh to backup some database and all is ok
os.execute("./fbink -q -y -29 -pmh 'REALIZANDO COPIA DE SEGURIDAD'")
os.execute("./fbink -q -y -27 -pmh 'DE LAS BASES DE DATOS DE KOBO'")
os.execute("./grabar_fich_kobo.sh")
Could I put something like this?
os.execute("qndb -m mwcToast 4000 "REALIZANDO COPIA DE SEGURIDAD DE LAS BASES DE DATOS DE KOBO")
os.execute("./grabar_fich_kobo.sh")
Could I even make the message stick while the file.sh is running? (not only 4 seconds)?
This is not important, just that I like to learn new things.
|
It depends, if you run before koreader launches and Nickel is still running, then yes that should work, otherwise no.
The main thing is that Nickel needs to be running for qndb to work.
Unfortunately, toasts are for a set duration only. I can think of a (really) dirty hack though.
If you call
qndb -m dlgConfirmNoBtn <title> <body>, this opens a message dialog. Then 'record' the touch of pressing the 'close' icon using something like
cat /dev/input/event1 > touchfile.
Then, you can display the message, and from your shell script you can pipe/redirect the contents of touchfile back into /dev/input/event1 to simulate a touch which should close the message box.
I might see if I can figure out a way of doing something more elegant in NDB itself.