qb in explorer under html

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
iamdenteddisk
Veteran
Posts: 185
Joined: Mon Jun 30, 2008 4:10 pm

qb in explorer under html

Post by iamdenteddisk »

I recently tried a snipit of qb code from qb4.5 inside code tags in my html enviroment like if I was inserting a java applet but when my program was finished I clicked run and it did!
flawless qb inside IE7 how is it that this worked, is there a limit to what I can do with it?
sid6.7
Veteran
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA
Contact:

Post by sid6.7 »

it probably wont work except at a local level and if the person running your html has qbasic....
angros47
Veteran
Posts: 79
Joined: Mon Sep 08, 2008 12:52 pm
Contact:

Post by angros47 »

Why don't you post some exaples of your code, so we can test it?

I'm not sure that I understand what did you do: you open qb from a HTML page, or you run qb commands inside the browser? (IE has VBscript, that is similar, for some aspects, to QB... did you use VBscript?)

Qb inside web pages seems very interesting, indeed.... I'd like to see what did you realize.
iamdenteddisk
Veteran
Posts: 185
Joined: Mon Jun 30, 2008 4:10 pm

how I done it..

Post by iamdenteddisk »

when I got to my insertion here is how I done it

<script> script = qb script
blah blah blah
</script>

I just droped my basic in the erea where the blah is without the end statment and just put system in its place.

the rest was prety automated the htmlbuilder prompted for how it was compiled I gave it a path and filename.

it was prety simple, I tried a few different snipits of code then I remembered one I wrote as a tut it used every command, it ran flawlessly too.
NO BS you play with it, it just works. the compile ran as if it was compiled from a commandline I guess it was in a scence.
User avatar
bongomeno
Veteran
Posts: 266
Joined: Wed Dec 10, 2008 9:08 am
Location: Arizona
Contact:

no way...

Post by bongomeno »

so you are saying that you embeded qb code into an html file like:

<script> script=qb script
print "Hello, world!"
system
</script>

and executed like a batch file or something?

i tried the above code in an html file and it did nothing?

what exactly is it that you did?
iamdenteddisk
Veteran
Posts: 185
Joined: Mon Jun 30, 2008 4:10 pm

by George I think he got it..

Post by iamdenteddisk »

yep, though the htmlbuilder did ask for which compiler to use I give it C:\compiler/QB.exe
just like that!
when I hit the run Icon the little "cammera" it works.

then I also played with starting qb from html the same way you would start a .wav in windows media player, that works too.

It works just aswell from another computer but there is a catch, to use Qb on my computer from say your house a keybord handler will need be on my computer that scans your keybord in exe form.. I hope that makes since..but code will run from the interpreter or from compiled .exe just like it was a plain html webpage. catch2 is you dont have access outside qb like html commands untill it exicutes the System command returning control to the index.html program file. -just like a wave or movie file on media player.

did you try it yet?, prety cool huh?
write a online game sprinkle some credz, party on!!
iamdenteddisk
Veteran
Posts: 185
Joined: Mon Jun 30, 2008 4:10 pm

another cool fact

Post by iamdenteddisk »

If you do this trick, and say you dont have Qb on the comp you are on, it will show a popup to download or run choosing the run feature sometimes Graphics/input error's it out closing the page but qb from the server that is cool shiznit in my book too.

If you download it then the second time through it will run from the server fine, something about dependancies...
Post Reply