logoSoftware | Card | Services

Introduction | Examples | Basics | Limits | SC Editors | ModuloPi | Flamethrower | Roadster HyperCarders

FT Examples:
Oblique Strategies
Html | Flash
Maths WorkSheet Creator
Function Machine WorkSheets
Create a 'Mondrian'
Puttin' On DE STIJL
Needs Flash
SuperCard Script Library
HTML | Flash


SuperCard as CGI

Flamethrower was a special edition of SuperCard that can receive messages from a web page and send messages back. SuperCard as a CGI.

2009-04-26 I've finally bitten the bullet and no longer have any live flamethrower examples.

I was just dipping my toe into flamethrower, the pages linked from here will have some simple examples and a diary of my progress. from 2001 till 2003

Here is a flamethrower counter for this page hits since 29 May 2001

And here is the diary of my progress: [diary produced with supercard of course, this page was created an uploaded from a Supercard project, before I heard of blogs.]

Sun, Jul 13, 2003

I haven't used Flame for a while now, and probably will not until the OS X version comes out.

I did however fix the html template for this page to make it look a bit nicer in Safari.

Sat, Feb 15, 2003

The ScriptLib Project has been replace by an php version here ScriptLib New Window.
Script lib may come back to flamethrower when Flame comes out for OS X.

Mon, Dec 23, 2002

"Flamethrower's functionality is scheduled to become OS X compatible some time in 2003."


Just noticed this on the classic supercard site. Noticed that any mention of Roadster has gone.

Sat, Nov 16, 2002

The flamethrower server has moved so I have update the links, please let me know if they don't work.

Sat, Sep 7, 2002

The problems I though I had in ScriptLib 2 and IE was due to a stupid mistake in my Flash scripting. I have fixed it now.
I have had a few positive comments about the ScriptLib concept, but very few script posted. Please add something.

Thu, Aug 22, 2002

A new Beta of ScriptLib
Definitely still some problems with IE.
I have also built a SuperCard interface which means you can get and post scripts and links directly from SuperCard. This seem a more useful approach for a Script library, it is also a good bit quicker.
Sun, Aug 4, 2002

Found a wee problem with Flash/Flame and IE
often using GET to send vars to FlameThrower from Flash, with IE they don't seem to get there. Netscape is fine.
The buttons in today's new Beta of ScriptLib try to work round that by checking to see if a value has been returned and resending after a while if they are not.
Try scriptLib buttons to load a menu or see a script. the new buttons feed back sending and resending until a value is returned. In Netscape the resend never happens, in IE nearly always. Before I added the resending clicking on buttons twice was the only way to get things to work in IE.
I still need to fix the buttons for sending comments and scripts. This only works well in Netscape at the moment here. Please let me know if you try it out either in the



Sat, Aug 3, 2002

Finished the first working version of ScriptLib
This is a online library of Supercard scripts. Scripts can be posted or commented on by anyone.
Flash version only at the moment. I have learnt quite a bit about both flash and flame playing with this. Main problem was sending scripts with ampersands etc from flash to flame, it was of course easy to fix once I knew how. both Flash and flame have escape functions to encode spaces and special chars. I went round the block a few times getting there. Once I know it works ok, I'll neaten up the scripts and upload them here.
Needs Flash 5, best with Flash 6

Thu, Jul 18, 2002

Change of IP address from to for all my flamethrower projects. I am in the process of updating all the links.
Please let me know about broken links John@littlefishSw.co.uk

Sun, May 26, 2002

Made a new version of the simpler counter used on this page. This makes use of the cgiReferer() function, what returns the web page address that the request to flame comes from.
This means I can use the one counter script to count hits on several pages.
Here is the new Script
Very simple but an example of the use of cgiReferer().
The script could also take into acount diffrent fonts and sizes sent from the web page too, again pretty simple.

Fri, May 24, 2002

Still working on a message board, with nothing much new to show.
A wee discovery, I am now using on my feedback project, links or anything with equals signs are not posted properly. I am experementing with the function and the change below seems to work. I'll fix the feedback soon(slightly discouraged, give me a post, if you are reading this.)

function GETParamValue theValue
put the itemdel into holditemdel
set the itemdel to "="
put the lineDel into toldLineDel
set the lineDel to "&"
put empty into theAnswer
put cgiSearchArgs() into theText
repeat with n = 1 to the number of lines of theText
if item 1 of line n of theText is theValue then
-- put item 2 of line n of theText into theAnswer
put line n of theText into theAnswer
delete item 1 of theAnswer
--ensures theText all get into theAnswer even if it contains equals signs

exit repeat
end if
end repeat
set the lineDel to toldLineDel
set the itemdel to holditemdel
return theAnswer
end GETParamValue

Sun, Apr 21, 2002

I have been working on a message board which not finished yet.
I have also discovered that if you can use personal web sharing for local testing, without connecting to the internet. My family was getting a little annoyed as no one could phone us. Basically the same way as I reported with MacHTTP below.(I was getting some flaky results with MaxcHTTP, probably nothing to do with the software)
You set up a configuration in the TCP/IP control panel with these settings:

Leaving everything else empty.
Turn Web Sharing on via the control pannel or control strip.

Tue, Feb 5, 2002

A few fixes to the DE STIJL stuff, improvment to the Gallery, although I need to stop it being cached in browsers. Changes in scripts to write the Gallery are not documented, but pretty simple. And The SWF file messages are a little clearer.

Sat, Feb 2, 2002

I have uploaded a new Flash/flamethrower combination:
Puttin' on DE STIJL
It is a toy to draw in flash Mondrian type pictures and save them via Flamethrower to the server.
I learnt quite a bit I didn't know about sending varables from Flash.
The Scripts from the Flash file and the Flamethrower project are here Mondrian scripts
Main thing I learnt, checking to see if the vars reached the right project and send them again if they didn't.

Sun, Jan 20, 2002

Figured out how to add a random varable for the counter above with JavaScript, I don't know how good it is as I know nothing about JS, anyway here it is:

<script language="JavaScript" type="text/javascript">
var a = Math.random() + ""
var thecounter = '<IMG SRC="$count'+'?ran='+a+'">'
document.write(thecounter );
// -->

Sat, Dec 29, 2001

Finally solved, I think, a problem with IE in Windows and Flash.
In the Obliques Stratigies Flash File clicking the 'Again" button just reposted the same data, IE in windows just reloaded from cache. Now I set a variable to a random number before sending the data.
Not sure how to do it from static web pages, but with forms generated from Flamethrower, I guess I could write a random number ot a hidden field in the form.

Sat, Nov 17, 2001

New IP for my flame stuff
All the links should be fixed, but if you see a broken one ples let me know, by sending feedback.

Sun, Nov 4, 2001

Did a major refit of the Flamethrower set up. My host Black Night Software are willing to host other peoplesFlamethower cgis and I have altered the dispatch project to suit.
The dispatch now runs through all the sub folders, one per user, inside the dispacth folder, which now sits beside the cgi-bin folder not inside it,. Here is the new dispatch script. This also handles the closing of users projects, so that they can be replaced by ftp, and the restarting of there projects.

Sun, Oct 28, 2001

I usually test things, by using Personel Websharing. Today I tried a suggestion from the Flamethrower Manual using MacHTTP 2.3. This allows me to test Flame without being connected to the internet.
You set up a configuration in the TCP/IP control panel with these settings:

Leaving everything else empty.
You then start up MacHTTP have Flamethrower in a cgi-folder inside the same folder as MacHTTP.
point your forms at
and you are away without clogging up the phone.
TCP/IP control panel Screenshot 12k, in a new window.
Local Testing Screenshot, 44K, in a new window, it is 1015 x 654 pixels so scroll around a bit.

Fri, Oct 12, 2001

Uploaded a new project Function Machines, it produces worksheets for teaching primary aged children simple maths functions, works pretty much like the general worksheet creator.

Sat, Sep 8, 2001

Solved yesterdays truncated JPEG problem, RTFM!
from the flamethrower manual:
Some HTTP servers put a cap on the amount of data that can be returned from a CGI
application. Be watchful of the amount of data that exporting a JPEG image produces. Depending on the content, complexity and dimensions of the original card or picture, along with the quality of the compression used, the resultant image data may be too much for your HTTP server to pass along to the client. Images that are too large to pass through will appear incomplete at the client. Check with your server's documentation to ascertain its limits.

New project:
New WorkSheet CGI Exports the JPEG to a file and redirect to the file.
Here is a form for setting various options for the CGI WorkSheet Creator

Fri, Sep 7, 2001

Got a system for closing down all the open FlameThrower projects except via a form and then restarting the dispatch project again with a diffrent parameter. This means I can close down projects and replace, remove or add to them without control of the server, or having to send them to my host here is a bit of the script:

case "StopThis"
cgiReply ("I am going close most things down now")
lock messages
-- case 1 statements
global gExplicitClose
put "true" into gExplicitClose
remove script of line 1 of the frontscripts from front
repeat with x = the number of lines in the windows down to 1
if the long name of this proj is in line x of the windows then next repeat
close line x of the windows
end repeat
put "false" into gExplicitClose
exit to superCard
exit switch
case "StartUpAgain"
if the number of lines in the windows >1
put the windows into twind
cgiReply ("All running"&CR&"again,<BR>"&CR&twind)
exit to supercard
end if
if the frontscripts is not "" then remove script of line 1 of the frontscripts from front
open project "startup"
send "openstartup" to cd 1 of project "startup"
put the windows into twind
put replace(twind,CR,"<BR>") into twind
cgiReply ("Reset ,<BR>"&CR&twind)

Of course these arn't the real switch values.

One of the new projects I have uploaded is a Primary Maths worksheet creator:
REPLACED see next entry
Problem is it seems to truncate the JPEG returned. The full 720x520 jpeg is not shown.

Sat, Aug 11, 2001

Ok All the examples are up and running.
Here are the scripts for the feedback project calling$feedback
just returns the previous feedback and a form to submit more. The submited data is added to the above url with GET.
window script
Turning Scripts into web pages is helped by xExternalTextHtml an external developed by Matteo Varisco http://web.tiscalinet.it/matteovarisco

Thu, Aug 9, 2001

Finally got the dispatch going.
The structure of ny SC Pouch now is The SharedFile and the StartUp project, the startup is just the dispatch project that ships with Flamethrower.
In the dispatch folder are the projects that do the cgi stuff:
data a folder that contains the feedback in a text file, simpler to maintain continuity.
feedback producs the feedback in html form
ffeedback sends a varable with the feedback to a flash file
boss a project that will let me organise and add more projects to the dispatch folder
foblique send an oblique stratigy to a Flash File
oblique returns an oblique stratigy as html
count returns an jpeg counter

This setup lets the actual cgi project be a lot simpler. I'll post the scripts soon.

Wed, Aug 8, 2001

Another long break from flamethrower.
Got a couple of seperate projects in a despatch folder fixed up now, I need to test and upload them.
Noticed NetScape much faster than IE in sending data to Flamethrower?
beginning to get an idea of how Flash works and will upload a version of the Feedback in flash.

Tue, Jul 24, 2001

A long break, I am going to upload a new sharedfile soon that is the dispatcher project

Thu, Jul 12, 2001

Started work on using separate projects for different function, which should help keep the updating a bit simpler. I am also going to keep data in external files, again this make it simple to update, I don't have to copy over userprops in the project.
I am using the dispatcher project which comes with flamethrower, and it seem to work as advertised here at home.

Wed, Jul 11, 2001

I haven't done much for a while.
Working at home, it seems better to call flame from a link, rather than a form button, if you are not sending fields, seems to solve the IE problem.

Wed, Jun 20, 2001

Here is the simplest flash, from the oblique stratigies above:
in the Action script

loadVariablesNum ("$foblique", 0);

In flamethrower:
put "&strat="&any line of fld "oblique" into tReply
cgiReply (tReply)

strat is the varable for a text box in the flash file

Still having trouble with IE, often need to click the submit button twice to get IE to send.

Tue, Jun 19, 2001

New Startup project uploaded, this runs several scripts:
Oblique which produces some html with a random oblique strategy
Flash Oblique Does the same thing in a neater Flash interface
Feedback HTML at the moment to let users give feedback on this site.
Maths Worksheets, a html form which sends choices to flamethrower, flamethrower creates a worksheet and returns it as a JPEG.

Mon, Jun 18, 2001

I have now enough error checking and get out from all the loops in my startup project, and it should be online soon.

Various other things have been fixed and the format of the feedback will work with Flash and HTML, just need to get my haed round flash, figuring out how to get it to wait until a varable is returned from Flamethrower.

Sunday, Jun 10, 2001

Figured out the Flash problem, the Flash files need to be in the same subdomain ast the cgi. Mine were not.
The new Startup was uploaded and disaster struck, a bug in the WorkSheet window meant Flamethrower got stuck in a loop, if certain varables were not passed to Flamethrower from a form. This should be easy enough to fix and I hope to have an improved version up soon.
Flamethrower is not running on the server until I fix and check everything.

Thu, Jun 7, 2001

Still no joy with flash, but I aded a window to the startup from my Worksheet Maker application.
A simple job to convert from SC and to take form input. Hopefully I'll get it uploaded soon.

Thu, Jun 7, 2001

It was my lack of Flash skill that were causing the problem, DOH!
I think I can get GET to work, in Flash, but am having problems with getting Flash to wait for the reply.
I am going to upload a new version of the startup proj which should work and then work on my Flash front end to the feedback.
The HTML and FLASH Obliques stratigies should work, as should the HTML Feedback as soon as the new startup proj is uploaded, until then i will take the examples offline.

I will also put up the script of my startup project again soon to show how I have altered it. It is still pretty messy with only one main cgiEvent handler and a few switches.

Once I get the basic flash thing working the next step is to farm out the messages to different objects or projects...

Projects back online:)

But: The flash dosen't seem to work:(
The oblique stratigies example works fine locally sending to the Flamethrower.cgi on this site and geting a returned variable, but the uploaded one dosen't. Try the oblique Flash example Oblique Strategies Flash this works fine from this file on my HD but not from the server.$foblique which is what the example calls seems to work, and Flame seems to get the message from the example cause the count goes up, but it dosen't get loaded.
11 AUG 2001This works now.

Tue, Jun 5, 2001

After a hint or two from Wayne Townsend and Chilton on the SC list I am trying to send to flame with GET. No luck:(

Got it, sending from an html form you can see everything in cgiFullRequest()
Following Wayne's suggestion I have a function which gives the value of a filed from a form:
using get:

function GETParamValue theValue
put the itemdel into holditemdel
set the itemdel to "="
put the lineDel into toldLineDel
set the lineDel to "&"
put empty into theAnswer
put cgiSearchArgs() into theText
repeat with n = 1 to the number of lines of theText
if item 1 of line n of theText is theValue then
put item 2 of line n of theText into theAnswer
exit repeat
end if
end repeat
set the lineDel to toldLineDel
set the itemdel to holditemdel
return theAnswer
end GETParamValue

I think I have the handle on an improved form and will update the startup proj once I have figued out how to send from Flash;
This works
loadVariablesNum ("cgi-bin/Flamethrower.cgi$ffeedback", 0);
from the action of a frame
but this dosent:
on (release) {
loadVariablesNum ("$faddfeedback", 0, "GET");
from an object action
Changing the GET to POST works in IE but not netscape

Mon, Jun 4, 2001

Trying to send forms from IE and NS from HTML forms and FLASH!
problems with POST/ IE
problems with NS FLASH/ POST
to many thing to check out and I have not started in windows Virtual PC
NOT a good day

Sun, Jun 3, 2001

A few more problems, noted on the feedback page.
Empty form returns are added as a date, I am going to fix that.
I didn't fix returns to linebreak tags.
Need to do that.
Working on two versions of the 2 simple examples, one html and one flash, I am also going to open the examples in a popup window with no links to simplify further.

Tue, May 29, 2001

These seems to be a Windows IE5 problem with my tests.
If you try to load 2 cgis in a row you get a blank white page.
my Feedback page has some details.
Everything seem to be ok at the server end so far.

I have a simpe check on the number of times this stuff is tried, at the start of my cgiEvent handle I put cgiPathArgs() into tWhatToDo
then switch tWhatToDo
and then at the end I
put the uAllhits of this wd into tAllhits
get lineoffset(tWhatToDo,tAllhits)
if it is not 0
then add 1 to last word of line it of tAllhits
set the uAllhits of this wd to tAllhits

I can get the urerprop from my cgiEvent handler by passing countallhits as a cgiPathArg
Try this link:
17.11.01 CGI REMOVED
And hit your back button to get back here.
The Windows IE problem dosen't show up from the win 2000 IE5 set up I have at work, if you have other versions of windows (ME) I would like to hear what happens.
I also made a mistake in some of the html that flamethrower returns, by using relative links, these of course lead to no existant files in the cgi-bin:(
these mistakes are in the html returned from View Feedback
7 June 2001 Should be fixed now
Most of the links are ok but the one to here and to the feedback page are wrong.

Sun, May 27, 2001

After a week away, the Flamethrower stuff seems to be working, I am uploading pages to call the CGIs today, and I hope a new version of the startup project tomorrow or the next day.
Now I need some Feedback

Sat, May 19, 2001

My host put a live example up on he web for me and it works:)
Just the starup project with two button script and one window one, the window one switches on the postarg() function
on script simple returns a random line of a card field wrapped in some html
Here is one:

get any line of fld "oblique"
get replace(fld "c","THEOB",it)

The other examples are the Feedback page and the counter on the flamethrower page.

here is the
window script

Wed, May 16, 2001

Well I got my answer about the last problem, you need to use Get rather than post to send to a button.
This works:
<:form name="form1" method="GET" ACTION="cgi-bin/Flamethrower.cgi$object$$=cd+btn+`FeedBack`">

Fri, May 11, 2001

Can't seem to get a button to catch a post argument
<:form name="form1" method="post" ACTION="cgi-bin/Flamethrower.cgi$object$$=cd+btn+`FeedBack`">
dosen't seem to get caught by the button:(

Wed, May 9, 2001

Got a nice simple test set up.

Macintosh HD:Web Pages:
  cgi-bin folder :
    SC Pouch:
startup is a default proj which will open if you don't aim at a particular proj I am using it to test the most basic stuff.
Got a web counter from Keith Martin's vortex samples
pretty neat the image tag:

<IMG SRC="/cgi-bin/Flamethrower.cgi$object$$=cd+btn+`count`">

calls a script in a card button on the first card of the only window in the startup proj.

on cgiEvent
add 1 to last word of card field "Counter"
export card from (topLeft of cd fld "Counter") to (bottomRight of cd fld "Counter") into theCounter with normal quality

-- tell Flamethrower what data to return
set the cgiContentTypeResponse to "image/jpeg"

end cgiEvent

Tue, May 8, 2001

Installed Flamethrower.
Set up Personal WebSharing sharing by opening the WebSharing control pannel and clicking Start.
open IE type in the Address from the Web Sharing Control pannel, which opens a list of files in my Web Page Folder.
Used some of Keith Martin's example and they worked fine:)
So far so good.

Back to top