Author |
Topic: BBC Basic for MAC (Read 1130 times) |
|
Mystic
Junior Member
member is offline


Gender: 
Posts: 53
|
 |
Re: BBC Basic for MAC
« Reply #8 on: Aug 16th, 2016, 11:22pm » |
|
on Aug 16th, 2016, 5:36pm, Richard Russell wrote: Code: open "HTML demo" for html as #main |
|
This would be awesome!
Currently I am creating HTML files with my LBB programs so that my folks can navigate them as web pages (My work will not allow me to use a web server to serve PHP pages).
So, I am trying to create the "web experience" they are used to, without actually running a web server. Just static web pages created from LBB.
It works pretty good, but it would be nice if I could have my program running in the HTML window, since now it's a bit awkward doing it the way I am.
RUNBASIC is close to what I would like to see, but even it is creating a server to serve the pages.
I'm looking more for something I can send out as just a executable that "feels" like a web page in how it functions for the users.
|
|
Logged
|
- Rick
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: BBC Basic for MAC
« Reply #9 on: Aug 16th, 2016, 11:45pm » |
|
on Aug 16th, 2016, 9:24pm, CryptoMan wrote:| Can't we make similar system calls with MAC OS-X? |
|
Of course you can make system calls, but I have no idea whether the Mac exposes an embeddable browser or HTML control in any way similar to ATL. You would need to ask an OS-X expert about that.
Richard.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: BBC Basic for MAC
« Reply #10 on: Aug 17th, 2016, 12:09am » |
|
on Aug 16th, 2016, 11:22pm, Mystic wrote:| I'm looking more for something I can send out as just a executable that "feels" like a web page in how it functions for the users. |
|
Why don't you simply bundle the pages with your application as straight .html files (LBB would allow you to embed them in the EXE file of course) and then point the local browser at them? Most, if not all, popular browsers support the file:// protocol I think (I've just tried Edge, FireFox and Chrome and they all seem to) so you shouldn't need an HTTP server like Run Basic.
Somewhat to my surprise even the ATL embedded browser control seems to understand the file:// syntax, although for some reason it was awfully slow at fetching the page across my home network.
Richard.
|
|
Logged
|
|
|
|
Mystic
Junior Member
member is offline


Gender: 
Posts: 53
|
 |
Re: BBC Basic for MAC
« Reply #11 on: Aug 17th, 2016, 12:51am » |
|
on Aug 17th, 2016, 12:09am, Richard Russell wrote:...for some reason it was awfully slow at fetching the page across my home network. |
|
Yep, one of the drawbacks for the file option. It works, but is painfully slow.
My HTML files are dynamic based on the program output. It's not like I am just accessing a bunch of static HTML files because they look pretty.
I would rather my program have input boxes on the HTML window (like a real form entry), then redraw the HTML page based on the database results, etc...
So essentially it would resemble typical HTML functionality, but being interpreted from the engine of LBB and not a server.
|
|
Logged
|
- Rick
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: BBC Basic for MAC
« Reply #12 on: Aug 17th, 2016, 08:46am » |
|
on Aug 17th, 2016, 12:51am, Mystic wrote:| So essentially it would resemble typical HTML functionality, but being interpreted from the engine of LBB and not a server. |
|
I would suggest you check out Microsoft's IWebBrowser2 control to see if it has the capabilities you need. Because it uses an Object Oriented (COM) interface you would need to use the CallMethod function I wrote in order to access it from LB/LBB:
Code:function CallMethod(object, method, parm$)
code$=chr$(139)+"D$"+chr$(4)+chr$(139)+"T$"+chr$(8)+chr$(139)+"L$" _
+ chr$(16)+"VW"+chr$(139)+"t$"+chr$(20)+chr$(43)+chr$(225)+chr$(139) _
+ chr$(252)+chr$(243)+chr$(164)+chr$(80)+chr$(139)+chr$(0)+chr$(255) _
+ chr$(20)+chr$(144)+chr$(95)+chr$(94)+chr$(194)+chr$(16)+chr$(0)
p$=parm$
n=len(p$)
calldll #user32, "CallWindowProcA", code$ as ptr, object as long,_
method as long, p$ as ptr, n as long, CallMethod as long
end function
Richard.
|
|
Logged
|
|
|
|
Mystic
Junior Member
member is offline


Gender: 
Posts: 53
|
 |
Re: BBC Basic for MAC
« Reply #13 on: Aug 17th, 2016, 3:08pm » |
|
Thanks! I'll check that out as well.
|
|
Logged
|
- Rick
|
|
|
|