Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-09-2020, 03:50 PM   #1
Skeeve
Zealot
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Scripting on Touch HD - wrong orientation

Hi.
I wrote a small script to download my daily newspaper on my Touch HD3. In case something goes wrong or the newspaper already was loaded I want to display some information.

For this I use (e.g.)

Code:
dialog 2 Exists "Load newspaper of $( date -D %s -d $today +%d.%m.%Y) again?" YES NO OPEN
What's strange is: The dialog is displayed as if I rotated the HD to the left.

How could this happen? No matter how I hold the device, the dialog is alway that way.

Last edited by Skeeve; 08-10-2020 at 06:30 AM.
Skeeve is offline   Reply With Quote
Old 08-10-2020, 06:29 AM   #2
Skeeve
Zealot
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Small update: If I do not use
Code:
#!/bin/sh
but
Code:
#!/ebrmain/bin/run_script -clear_screen -bitmap=s2pb_wizard_wifircp
the orientation is correct and a WIFI-Logo is diesplayed in the background.

I couldn't figure out how to display an image instead. Seems run_script can only display bitmaps defined in /ebrmain/themes/Line.pbt.

The WIFI-Logo is fine for me as it indicates that a WIFI connection is required.

BTW: Anyone any idea how to use input_dialog.app?
Skeeve is offline   Reply With Quote
Advert
Old 08-10-2020, 08:13 AM   #3
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 746
Karma: 619508
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
1) First post: Orientation: Guess it is a bug.

2) input_dialog.app: from the hexcode I guess it is to input passphrases:

MainFrame::GetPassphrase()
Looks like: Parameter:
1) headertext
2) infotext
3) infoclicklinks
4) button1text
5) button2text
6) edithinttext
7) datafilepath
Its used to open an sq3 database in the legimiviewer.app.
nhedgehog is offline   Reply With Quote
Old 08-10-2020, 08:55 AM   #4
Skeeve
Zealot
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Looking into the "strings" it seems to be also used in the eink-reader.app

I hoped for something like "dialog" in order to be able to ask for input from a script.
Skeeve is offline   Reply With Quote
Old 08-10-2020, 09:09 AM   #5
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 746
Karma: 619508
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
Try a look into inkview.h. Though mine is from 2011.
Attached Files
File Type: zip inkview.zip (11.0 KB, 362 views)
nhedgehog is offline   Reply With Quote
Advert
Old 08-10-2020, 09:25 AM   #6
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
I'm not sure if it still works on the latest devices, but I wrote something for displaying dialogs within shell scripts. Here is the thread for that: https://www.mobileread.com/forums/sh...d.php?t=163556
rkomar is offline   Reply With Quote
Old 08-10-2020, 12:10 PM   #7
Skeeve
Zealot
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Quote:
Originally Posted by nhedgehog View Post
Try a look into inkview.h. Though mine is from 2011.
That's for programming in C, right?

As I never got my head around how to program in C for the Pocketbook, I doubt it's useful.

Quote:
Originally Posted by rkomar View Post
I'm not sure if it still works on the latest devices, but I wrote something for displaying dialogs within shell scripts.
Thanks! Will try it out and report over there.
Skeeve is offline   Reply With Quote
Old 08-10-2020, 12:29 PM   #8
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 746
Karma: 619508
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
Yes but it gives you an idea, what the program is expecting from commandline:
void Dialog(int icon, const char *title, const char *text, const char *button1, const char *button2, iv_dialoghandler hproc);
nhedgehog is offline   Reply With Quote
Old 08-10-2020, 03:31 PM   #9
Skeeve
Zealot
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Quote:
Originally Posted by nhedgehog View Post
Yes but it gives you an idea, what the program is expecting from commandline:
void Dialog(int icon, const char *title, const char *text, const char *button1, const char *button2, iv_dialoghandler hproc);
That's what dialog emits when yo call it without parameter.

dialog I already use. The icons are:
1: i
2: =
3: !
4: X
5: Wifi

title seems without effect.

text is the text displayed.

buttonN are the labels of the 1 to 3 buttons.

Exitcode ist the number of the button.
Skeeve is offline   Reply With Quote
Old 08-22-2020, 05:24 AM   #10
ezdiy
Zealot
ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.
 
Posts: 121
Karma: 156515
Join Date: Oct 2019
Device: KT, KPW4, PB740-2
Workaround I'm using at the start of the script. The general issue is that the stack manager gets confused from the app list context, so we steal foreground of a place that has correct orientation for us to plaster the modal over.
ezdiy is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Book Title on Pocketbook Touch HD2 is wrong CC-Peter PocketBook 2 01-13-2018 06:10 AM
Does Kobo Touch change orientation? Orn8one Kobo Reader 22 01-13-2014 05:31 PM
Kindle touch wrong time mike7 Amazon Kindle 4 03-03-2013 03:25 AM
Kobo Touch 2.1.5 wrong cover bug still roycymru Kobo Reader 16 12-30-2012 12:06 AM
[Kindle Touch] when I reboot, the orientation is horizontal zerolucat Kindle Developer's Corner 4 10-30-2012 05:39 PM


All times are GMT -4. The time now is 01:59 PM.


MobileRead.com is a privately owned, operated and funded community.