kiosk mode

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

kiosk mode

Postby Otto » Mon Apr 19, 2021 12:07 pm

Dear Antonio,

I remember that you showed on SLACK how to run a mod harbour program in kiosk mode on PC.
Unfortunately, I no longer have access to SLACK. Can you please post again how to do it?
Best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6272
Joined: Fri Oct 07, 2005 7:07 pm

Re: kiosk mode

Postby Antonio Linares » Mon Apr 19, 2021 6:16 pm

Dear Otto,

> kiosk mode on PC

Could you post a screenshot of what you mean ?

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41904
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: kiosk mode

Postby Otto » Mon Apr 19, 2021 11:07 pm

Dear Antonio,
start chrome --new-window --app=https://winhotel.space/formular/index.html --window-position=100,100 --window-size=1200,600
It is not really the same you showed us - maybe it was electron.
But this works for me.
Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6272
Joined: Fri Oct 07, 2005 7:07 pm

Re: kiosk mode

Postby Otto » Tue Apr 20, 2021 6:27 am

Dear Antonio,
Can you please help me?
How can you notify the browser that the "APP" has been closed.
How to update the browser?
Do I have to use a timer?
Best regard,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6272
Joined: Fri Oct 07, 2005 7:07 pm

Re: kiosk mode

Postby Antonio Linares » Tue Apr 20, 2021 8:19 am

Dear Otto,

is this what you mean ?
https://stackoverflow.com/questions/2584124/javascript-register-window-tab-closing-event-before-window-tab-close

If so, it seems as a little javascript is required:
Code: Select all  Expand view
window.onbeforeunload = function (e) {
  var e = e || window.event;

  // For IE and Firefox
  if (e) {
    e.returnValue = 'Any string';
  }

  // For Safari
  return 'Any string';
};
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41904
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: kiosk mode

Postby Otto » Tue Apr 20, 2021 10:03 am

Dear Antonio,

Many Thanks.
I don't understand how you can then query the value in FIVEWIN.

I have to call the mod harbor APP using a bat file.

I installed the APP as a PWA, but I have not yet found out how to start the APP from FIVEWIN.

Best regards,
Otto

Code: Select all  Expand view

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   local oDlg, lExit := .f., oBtn

   DEFINE DIALOG oDlg FROM 5, 5 TO 15, 40 TITLE "A Dialog Box"

          @ 3,4 ;
      BUTTON "&END" ;
        SIZE 40, 12 ;
      ACTION  ( lExit := .t., oDlg:End() ) ;
          OF oDlg


   @ 3, 12 BUTTON oBtn PROMPT "&Run" OF oDlg SIZE 40, 12 ;
      ACTION ( waitrun( "c:\test\formular.bat", 0 )  )

   ACTIVATE DIALOG oDlg VALID lExit

return nil

//----------------------------------------------------------------------------//


 

formular.bat
Code: Select all  Expand view

cd\
cd C:\Windows\System32
REM window-position=y col,x row  
start chrome --new-window --app=https://... --window-position=600,300  --window-size=1500,730
 


Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6272
Joined: Fri Oct 07, 2005 7:07 pm

Re: kiosk mode

Postby Antonio Linares » Tue Apr 20, 2021 12:45 pm

Dear Otto,

Are you looking to launch a mod_harbour app from a FWH app ?

You could use ShellExecute() to go to a URL

Please show a diagram or explanation, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41904
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: kiosk mode

Postby Otto » Tue Apr 20, 2021 2:30 pm

Dear Antonio,

I do not find out how to pass the parameters:

Code: Select all  Expand view
--new-window --app=https://wintest.com/formular/index.html --window-position=600,300  --window-size=1500,730
 

Without parameter, Chrome opens.
Code: Select all  Expand view
   
     @ 3, 12 BUTTON oBtn PROMPT "&R u n" OF oDlg SIZE 40, 12 ;
      ACTION (  ShellExecute( 0, 'Open', "https://wintest.com/formular/index.html"  , )  )

 


>Are you looking to launch a mod_harbour app from a FWH app ?
I would like to launch a mod harbour app from a FWH EXE.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6272
Joined: Fri Oct 07, 2005 7:07 pm

Re: kiosk mode

Postby Otto » Tue Apr 20, 2021 3:45 pm

Dear Antonio,

Please see the video.

https://mybergland.com/fwforum/callmodharbourfromwinhotel.mp4

Next step, I will save the changes made inside the form with AJAX.

How can I notify my xBrowse that the record changed?
That is my problem.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6272
Joined: Fri Oct 07, 2005 7:07 pm

Re: kiosk mode

Postby Antonio Linares » Tue Apr 20, 2021 5:55 pm

I would say that a timer is a solution, but Mr. Rao surely knows a better way of doing it
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41904
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 17 guests