Is it possible for apps to appear to run outside of browser?

Just starting out? Need help? Post your questions and find answers here.
elriba
Posts: 5
Joined: Fri Oct 04, 2019 4:45 pm

Is it possible for apps to appear to run outside of browser?

Post by elriba »

Hi,
Let me try to explain what I mean.

When you run any of the demo programs from the showcase, they appear on a new tab on the web browser. In my machine they run in a new tab on my google chrome.

Is it possible to run an app that gives the impression that it is running out of the web browser, on its own window?

I have seen something like this done with web pages, where the page opens a new browser instance and the page "appears" to be running "on its own window". Is it possible to do this with SpiderBasic?

Thanks!
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Is it possible for apps to appear to run outside of brow

Post by Peter »

Hello elriba,

a SpiderBasic app always requires a browser because SpiderBasic translates the basic code into JavaScript.

However, you can use Electron or NwJs. This gives the impression that the SpiderBasic app is a native desktop app.

For further informations take a look at this thread: viewtopic.php?f=9&t=1442&p=5086

Greetings ... Peter
elriba
Posts: 5
Joined: Fri Oct 04, 2019 4:45 pm

Re: Is it possible for apps to appear to run outside of brow

Post by elriba »

Thanks Peter!
jamirokwai
Posts: 40
Joined: Fri Sep 25, 2015 12:00 pm

Re: Is it possible for apps to appear to run outside of brow

Post by jamirokwai »

Or you could create a simple App with Purebasic, like this...
The snippet compiles to about 116kb on my Mac.

Code: Select all

OpenWindow(0,100,100,400,400,"Test-App")
WebGadget(0,0,0,400,400,"/path/to/myhtml.html")
Repeat
  Delay(25)  
Until WindowEvent() = #PB_Event_CloseWindow
This myhtml.html will be displayed inside the App.

Code: Select all

<html>
<head>
<title>Test</title>
</head>
<body>
TEST!
<script>
document.write(window.navigator.userAgent);
</script>
</body>
</html>
You could even put the whole page as a ZIP-archive into a PB-datasection to obfuscate the HTML and make your App even smaller...

Cheers
Jörg
Post Reply