Poor-man Electron

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
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 | Expand

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

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: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
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 | Expand

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: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
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 | Expand

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: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Poor-man Electron

Post by cnavarro »

Code: Select all | Expand


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
Antonio Linares
Site Admin
Posts: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Poor-man Electron

Post by Antonio Linares »

Cristobal,

great! :-)

This one maximizes it:

myapp.bat

Code: Select all | Expand

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

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

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.
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
Rick Lipkin
Posts: 2668
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 | Expand


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


alt+F4 closes the Kiosk app ..

Rick Lipkin
Post Reply