Page 1 of 1

kiosk mode

Posted: Mon Apr 19, 2021 12:07 pm
by Otto
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

Re: kiosk mode

Posted: Mon Apr 19, 2021 6:16 pm
by Antonio Linares
Dear Otto,

> kiosk mode on PC

Could you post a screenshot of what you mean ?

thanks

Re: kiosk mode

Posted: Mon Apr 19, 2021 11:07 pm
by Otto
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

Re: kiosk mode

Posted: Tue Apr 20, 2021 6:27 am
by Otto
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

Re: kiosk mode

Posted: Tue Apr 20, 2021 8:19 am
by Antonio Linares
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

window.onbeforeunload = function (e) {
  var e = e || window.event;

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

  // For Safari
  return 'Any string';
};

Re: kiosk mode

Posted: Tue Apr 20, 2021 10:03 am
by Otto
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


#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


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

Re: kiosk mode

Posted: Tue Apr 20, 2021 12:45 pm
by Antonio Linares
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

Re: kiosk mode

Posted: Tue Apr 20, 2021 2:30 pm
by Otto
Dear Antonio,

I do not find out how to pass the parameters:

Code: Select all | Expand

--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

   
     @ 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

Re: kiosk mode

Posted: Tue Apr 20, 2021 3:45 pm
by Otto
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

Re: kiosk mode

Posted: Tue Apr 20, 2021 5:55 pm
by Antonio Linares
I would say that a timer is a solution, but Mr. Rao surely knows a better way of doing it