FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Utilities / Utilidades Poor-man Electron
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Poor-man Electron
Posted: Sun Jul 21, 2019 03:14 PM
Electron concept is to use web apps as desktop apps.

With these small batch files we launch our remote web apps developed with mod_harbour:

Once Edge shows press F11 to hide the navigation bar (any idea to do this programmatically?)

myapp.vbs
Code (fw): Select all Collapse
Set objIE = CreateObject( "Shell.Application" )

objIE.Open( "microsoft-edge://harbour.fourtech.es/modharbour_samples/genesis/index.prg" )


myapp.bat //this option is worse as a cmd window is shown
Code (fw): Select all Collapse
start microsoft-edge:https://harbour.fourtech.es/modharbour_samples/genesis/index.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Poor-man Electron
Posted: Sun Jul 21, 2019 04:14 PM
This seems as a very good candidate also, but I am unable to make it run. Help! :-)

Code (fw): Select all Collapse
start microsoft-edge:http://google.com
>> $wshell = New-Object -ComObject wscript.shell;
>> $wshell.AppActivate('Google - Microsoft Edge')
>> Sleep 2
>> $wshell.SendKeys('{F11}')
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Poor-man Electron
Posted: Sun Jul 21, 2019 05:25 PM
This seems to be a good one but SendKeys is not working yet:

myapp.vbs
Code (fw): Select all Collapse
set ws = CreateObject( "WScript.Shell" )
ws.Run( "microsoft-edge://harbour.fourtech.es/modharbour_samples/genesis/index.prg" )
ws.AppActivate( "Edge" )
ws.SendKeys( "{F11}" )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Poor-man Electron
Posted: Sun Jul 21, 2019 05:52 PM
Code (fw): Select all Collapse
start chrome --start-fullscreen -app=https://harbour.fourtech.es/modharbour_samples/genesis/index.prg
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Poor-man Electron
Posted: Sun Jul 21, 2019 05:58 PM
Cristobal,

great! :-)

This one maximizes it:

myapp.bat
Code (fw): Select all Collapse
start chrome --kiosk -app=https://harbour.fourtech.es/modharbour_samples/genesis/index.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Poor-man Electron
Posted: Sun Jul 21, 2019 06:18 PM

Yes, but it is better to keep the preferences of the last session of the user.

Si, pero es mejor mantener las preferencias de la ultima sesion del usuario.

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Poor-man Electron
Posted: Mon Jul 22, 2019 04:24 PM
Antonio

Be Carefull using the Chrome Kiosk option ...

Code (fw): Select all Collapse
start chrome --kiosk -app=https://harbour.fourtech.es/modharbour_samples/genesis/index.prg


alt+F4 closes the Kiosk app ..

Rick Lipkin

Continue the discussion