Hi, Here's a specialized XICON-like hack that will help some of you BADGE contest enterers to comply with some of the tougher constraints contained in the rules. The contest rules state that you should be able to drag your entire demo (in a drawer if necessary) as a single icon onto a hard disk and have it still work from either the workbench or CLI without any ASSIGNs or assumed disk names etc. This hack is particularly useful to Director owners who are using custom fonts or using the sound module, but may also be useful with any other programs having similar problems determining the name of the directory they are being run from. When using fonts included with your demo, or (in the Director) the sound module, someone has to tell the system where all the stuff is. Due to a bug (or is it a feature :-) in AmigaDOS Execute() system call (which the Director uses internally for its EXECUTE command), programs being EXECUTEd will always think they are being run from the root directory of DF0:, with no way to determine where the EXECUTEing demo is actually being run from. This makes it virtually impossible to assign fonts to the directory you are running your demo from without making some assumptions as to the name of the disk on which the demo is contained etc. Since this is in conflict with some of the suggestions in the BADGE contest rules, I put together this hack. This program is a small (6K) program with icon, that determines it's own directory, and does an ASSIGN HERE: to that directory. It will then search the tooltypes parameters in the icon for a string that starts with EXECUTE= . It will do an Execute() call to run the program(s) (with parameters) specified by these EXECUTE= entries (multiple such entries are allowed). This example does an EXECUTE=projector here:demo.film to run a Director animation. The resultant animation can assume that HERE: is assigned to it's current directory, and specify that as the location of the FONTS: and the MOD: directory (for the sound module) with Director commands such as: EXECUTE a,"assign mod: here:options" MODULE "sound" PAUSE 20 :rem delay to allow module to load without :rem disk contention. (you could load other :rem stuff instead) EXECUTE a,"assign mod:" :rem unassign mod, don't need anymore ...(load sounds, play sounds, etc.)... EXECUTE a,"assign temp: fonts:" EXECUTE a,"assign fonts: here:fonts" ...(load fonts etc)... EXECUTE a,"assign fonts: temp:" EXECUTE a,"assign temp:" ...(setfont, etc.)... All other references to file names (picture,sound etc.) within the script should probably be done using HERE: for correct operation. Upon exit of the program, demorun will un-assign HERE: so the entry does not take up any memory (another contest rule is that demos will return all it's memory, a laudable goal). You should remember that any ASSIGNs done in your script should before completion do an: ASSIGN TEMP: (for example to unassign temp) to undo any special assigns that have been done. Ideally, if you have correctly undone all the assigns you can check this with the ASSIGN command from the CLI after running your demo and see if there are any outstanding assign entries that reference the disk that contains your demo. If there are none, the disk icon should disappear after being removed from the drive, and you have correctly undone all that you have done during the demo. (*whew*). The icon also has a WINDOW= command in the tooltypes section of the icon (check this with the workbench "info" command after clicking once on the demorun icon). This sets up an initial window which may be necessary for the programs being run if they output anything to the CLI window. Without this window definition, such programs will crash. This window feature makes the existance of the Projector icon completely unecessary. You can change the window's title by changing the title string contained in the WINDOW= tooltypes parameter. Note that the stack parameter in the icon will only affect the stack for the demorun program itself, if you need to adjust the stack for the program you're running (shouldn't need to for the Projector) you'll have to do an: EXECUTE=execute here:script with a stack command in the script. (I haven't tried this by the way). This should use the execute AmigaDOS command to run a script file which can adjust the stack for programs executed by the script itself. Any script output should still end up on the demorun window. This program will also run from the cli simply by typing it's name. I expect you may decide to re-name it to something more suitable for your demo, and perhaps rework the design of the icon with an icon tool. As you may have surmised, with the Director doing both sound and custom fonts, you end up doing about 10 ASSIGN commands during the course of the demo. Lot of thrashing, don't know if its really worth all that, but it is about the only way to completely meet the fine print of the terms of the BADGE contest. Please let anyone you may know who is submitting a Director-based demo to the BADGE contest about this, time is getting short. Rest assured, future Directors will eliminate most if not all of such complications (if future AmigaDOS's don't do it for us). Keith Doyle 9/12/88 213-325-1311 (7pm-12mid Mon-Thu)