Poor-man Electron

Poor-man Electron

Postby Antonio Linares » Sun Jul 21, 2019 3: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: Select all  Expand view
Set objIE = CreateObject( "Shell.Application" )

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


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

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

Re: Poor-man Electron

Postby Antonio Linares » Sun Jul 21, 2019 4:14 pm

This seems as a very good candidate also, but I am unable to make it run. Help! :-)

Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Poor-man Electron

Postby Antonio Linares » Sun Jul 21, 2019 5:25 pm

This seems to be a good one but SendKeys is not working yet:

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

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

Re: Poor-man Electron

Postby cnavarro » Sun Jul 21, 2019 5:52 pm

Code: Select all  Expand view

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
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Poor-man Electron

Postby Antonio Linares » Sun Jul 21, 2019 5:58 pm

Cristobal,

great! :-)

This one maximizes it:

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

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

Re: Poor-man Electron

Postby cnavarro » Sun Jul 21, 2019 6: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
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Poor-man Electron

Postby Rick Lipkin » Mon Jul 22, 2019 4:24 pm

Antonio

Be Carefull using the Chrome Kiosk option ...

Code: Select all  Expand view

start chrome --kiosk -app=https://harbour.fourtech.es/modharbour_samples/genesis/index.prg
 


alt+F4 closes the Kiosk app ..

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2617
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to Utilities / Utilidades

Who is online

Users browsing this forum: No registered users and 28 guests