Poor-man Electron

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Poor-man Electron

Post by Antonio Linares »

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

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

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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Poor-man Electron

Post by Antonio Linares »

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

Code: Select all

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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Poor-man Electron

Post by Antonio Linares »

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

myapp.vbs

Code: Select all

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

Re: Poor-man Electron

Post by cnavarro »

Code: Select all

start chrome --start-fullscreen -app=https://harbour.fourtech.es/modharbour_samples/genesis/index.prg
 
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Poor-man Electron

Post by Antonio Linares »

Cristobal,

great! :-)

This one maximizes it:

myapp.bat

Code: Select all

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

Antonio Linares
www.fivetechsoft.com
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Poor-man Electron

Post by cnavarro »

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.
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Poor-man Electron

Post by Rick Lipkin »

Antonio

Be Carefull using the Chrome Kiosk option ...

Code: Select all

start chrome --kiosk -app=https://harbour.fourtech.es/modharbour_samples/genesis/index.prg
 
alt+F4 closes the Kiosk app ..

Rick Lipkin
Post Reply