Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Problem saving an external file. Please help!

Problem saving an external file. Please help!

Problem saving an external file. Please help!

I want to put a button in my Authorware piece that saves a users test report to a text file.  How do I do this?

This test report is plain text (with some variable-pointers) that will not appear on the screen.  The user does a test, and then to see how when they have done in the test, they should have to look at the text file authorware creates after they click the button 'Save test report
to disk'.

I have considered the WriteExtFile function for this, but the two main problems with this way of doing it are:

- I cannot use proper formatting in the report.  It seems to be just ascii without wrapping. (unless I am mistaken?)

- I need a "browse" button to force the user to point to the folder they want to save the file.

I am using Authorware5 and the package will be delivered on CD (not on the web at all).

Any ideas?  The simpler and easier the better please!!

Thanks in advance,


RE: Problem saving an external file. Please help!

It is AASCI, you'll need to use ^Return  etc to format it in a crude way, or else use one of the clumsy report writers for authorware 5. Look in the Knowledge Objects 'interface' group for a KO to save files.


RE: Problem saving an external file. Please help!

For the "browse" button, you can use the KO like Ron said--it's called "Browse Folder Dialog Knowledge Object" in Authorware 5.  There are other UCD's & such that you could use as well, but the KO is probably the simplest and easiest.

The option Ron gave might be the easiest but I have a few suggestions that are pretty simple and a little more flexible as well--not to mention free...they still use the WriteExtFile() function.

If you know HTML, you can write the file out as a HTML rather than plain text.  Just create a variable (say HTMLFile) where you plug the variable and static information along with html tags to format it to make it look pretty.  They you just use WriteExtFile to write out the variable to a file, making sure to name it with a .html or .htm extension.  

Another simple option is to create the page you want to print in wordpad (make sure to use wordpad and not MS word).  Where you want to put in variable information, put the variable name in between characters--for example where you want the score to appear, put <SCORE> in the wordpad file.  Save it as an rtf.  Then in your Authorware program, you read in the file, replace the <SCORE> with the variable name, and write it back out.  Sample code would look something like this:

PrintFile:=ReadExtFile(FileLocation ^ "RTF_file.rtf"
PrintFile:=Replace("<SCORE>", Score, PrintFile)
WriteExtFile(FileLocation ^ "certificate.rtf")

you could add a JumpOutReturn() or JumpPrintReturn() to open or print the file once it's created.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close