Just starting out? Need help? Post your questions and find answers here.
RobertRioja
 
Posts: 5
Joined: Tue Jul 16, 2019 2:07 am
Location: USA

VB Script

by RobertRioja Tue Jul 16, 2019 2:13 am

Is it possible to use VB Script within a SpiderBasic program?
Thanks,
Robert
the.weavster
 
Posts: 164
Joined: Sat Mar 01, 2014 3:02 pm

Re: VB Script

by the.weavster Tue Jul 16, 2019 11:47 am

No. SpiderBasic has its own BASIC syntax that gets compiled to JavaScript.
plouf
 
Posts: 40
Joined: Tue Feb 25, 2014 6:01 pm

Re: VB Script

by plouf Tue Jul 16, 2019 5:05 pm

but it is possible to have JavaScript inline
If this alternative is ok to you

just use ! in front of your jscode
RobertRioja
 
Posts: 5
Joined: Tue Jul 16, 2019 2:07 am
Location: USA

Re: VB Script

by RobertRioja Tue Jul 16, 2019 5:57 pm

Thank you for the replies. I am starting to play with SpiderBasic (I use PureBasic a lot). But I cannot find a way to access the local file system. I know that for security reasons browsers cannot access your files directly. Neither HTML nor Javascript can do it. But it can be done with VBScript.

Does anyone know how to read and write local files with SpiderBasic?

Thanks,
Robert
plouf
 
Posts: 40
Joined: Tue Feb 25, 2014 6:01 pm

Re: VB Script

by plouf Tue Jul 16, 2019 6:58 pm

AFAIK you cant
munfraid
 
Posts: 29
Joined: Sat Mar 24, 2018 1:33 pm

Re: VB Script

by munfraid Tue Jul 16, 2019 7:24 pm

RobertRioja wrote:I cannot find a way to access the local file system. But it can be done with VBScript.


What a nightmare. Thank god it's not supported by any modern browser.
RobertRioja
 
Posts: 5
Joined: Tue Jul 16, 2019 2:07 am
Location: USA

Re: VB Script

by RobertRioja Tue Jul 16, 2019 8:56 pm

So please excuse my ignorance, but what is Spiderbasic used for, if you cannot access files? I thought it would be a neat way to do software with a nice GUI and be able to run it on many platforms. But without access to local storage, I don't see much use for it. Maybe it is good for games, but that is not my area. I guess I will stick to PureBasic and similar languages.

Thanks for the info.
Robert
the.weavster
 
Posts: 164
Joined: Sat Mar 01, 2014 3:02 pm

Re: VB Script

by the.weavster Wed Jul 17, 2019 7:09 am

You can use PureBasic to create CGIs that can access the file system on the PC they're served from. As a comparison let's compare writing an accounting application in PB with SB+PB:

With PB you'd likely use a database server, say MariaDB, and you'd create an executable that would work with that directly and have to be installed on all client PCs (which would have to be running Linux, Mac or Windows on x86 or x64).

With SB+PB you could make a JSON-RPC server where the UI is in SB but the database read/writes are handled by CGIs written in PB. The server would still have to run Linux, Mac or Windows but the client side could be anything with a browser and there is no client side install required. Another advantage is when you update your app you only need to do that in one place.
the.weavster
 
Posts: 164
Joined: Sat Mar 01, 2014 3:02 pm

Re: VB Script

by the.weavster Wed Jul 17, 2019 7:10 am

Oh, and...

SpiderBasic can also be used for creating Android and iOS apps. These can access the file system.
saboteur
 
Posts: 19
Joined: Mon Jan 08, 2018 10:25 am

Re: VB Script

by saboteur Wed Jul 17, 2019 9:58 am

I'd love to see some examples of using PB to create a (F)CGI and then integrating it with a Siderbasic program.

I've just got database access working as i like it using PHP PDO as this is what i've been used to, but I have no understanding of CGI and tbh SB's help is, well, not a lot of help.

If it wasn't for this forum and the help people like the.weavster and peter have given i'd have given up ages ago.

Back on topic though, is not possible to upload and download files ?? That seem pretty fundamental to many web based programs e.g photoalbum

cheers
Return to Coding Questions

Who is online

Users browsing this forum: No registered users and 2 guests