|
|
#1 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 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 07:30 AM. |
|
|
|
|
|
#2 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 Code:
#!/ebrmain/bin/run_script -clear_screen -bitmap=s2pb_wizard_wifircp 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? |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 814
Karma: 628976
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. |
|
|
|
|
|
#4 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#5 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 814
Karma: 628976
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
|
Try a look into inkview.h. Though mine is from 2011.
|
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,069
Karma: 18821071
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
|
|
|
|
|
|
#7 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
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. Thanks! Will try it out and report over there. |
|
|
|
|
|
#8 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 814
Karma: 628976
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); |
|
|
|
|
|
#9 | |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
Quote:
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. |
|
|
|
|
|
|
#10 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Book Title on Pocketbook Touch HD2 is wrong | CC-Peter | PocketBook | 2 | 01-13-2018 07:10 AM |
| Does Kobo Touch change orientation? | Orn8one | Kobo Reader | 22 | 01-13-2014 06:31 PM |
| Kindle touch wrong time | mike7 | Amazon Kindle | 4 | 03-03-2013 04:25 AM |
| Kobo Touch 2.1.5 wrong cover bug still | roycymru | Kobo Reader | 16 | 12-30-2012 01:06 AM |
| [Kindle Touch] when I reboot, the orientation is horizontal | zerolucat | Kindle Developer's Corner | 4 | 10-30-2012 06:39 PM |