VB Script

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

VB Script

Post by RobertRioja »

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

Re: VB Script

Post by the.weavster »

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

Re: VB Script

Post by plouf »

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

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

Re: VB Script

Post by RobertRioja »

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: 194
Joined: Tue Feb 25, 2014 6:01 pm
Location: Athens,Greece

Re: VB Script

Post by plouf »

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

Re: VB Script

Post by munfraid »

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: 34
Joined: Tue Jul 16, 2019 2:07 am
Location: USA
Contact:

Re: VB Script

Post by RobertRioja »

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: 220
Joined: Sat Mar 01, 2014 3:02 pm

Re: VB Script

Post by the.weavster »

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: 220
Joined: Sat Mar 01, 2014 3:02 pm

Re: VB Script

Post by the.weavster »

Oh, and...

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

Re: VB Script

Post by saboteur »

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
Post Reply