FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour kiosk mode
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
kiosk mode
Posted: 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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: kiosk mode
Posted: Mon Apr 19, 2021 06: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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: kiosk mode
Posted: 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

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: kiosk mode
Posted: Tue Apr 20, 2021 06: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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: kiosk mode
Posted: Tue Apr 20, 2021 08: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 (fw): Select all Collapse
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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: kiosk mode
Posted: 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 (fw): Select all Collapse
#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 (fw): Select all Collapse
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


Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: kiosk mode
Posted: 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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: kiosk mode
Posted: Tue Apr 20, 2021 02:30 PM
Dear Antonio,

I do not find out how to pass the parameters:

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

Without parameter, Chrome opens.
Code (fw): Select all Collapse
     
     @ 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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: kiosk mode
Posted: Tue Apr 20, 2021 03: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: kiosk mode
Posted: Tue Apr 20, 2021 05: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

Continue the discussion