estell@m.cs.uiuc.edu (06/09/89)
I'm writing a program in TML Basic that needs to be able to launch an Applesoft program. The Applesoft program can't be run directly; one must go through BASIC.LAUNCHER. My problem is that I can't figure out how to pass the appropriate data so that the Applesoft program is run "automatically". Any suggestions? ------------------------------- John K. Estell Univ. of Illinois estell@cs.uiuc.edu "This is neither a clever nor a witty quotation."
mattd@Apple.COM (Matt Deatherage) (06/10/89)
In article <7300016@m.cs.uiuc.edu> estell@m.cs.uiuc.edu writes: > >I'm writing a program in TML Basic that needs to be able to launch an >Applesoft program. The Applesoft program can't be run directly; one >must go through BASIC.LAUNCHER. My problem is that I can't figure out >how to pass the appropriate data so that the Applesoft program is run >"automatically". Any suggestions? > > >------------------------------- >John K. Estell Univ. of Illinois estell@cs.uiuc.edu >"This is neither a clever nor a witty quotation." EEK! EEK! EEK! BASIC.LAUNCHER is our little way of letting the Finder (and before it, the Launcher) launch BASIC programs. As such, it's part of the Finder file set now and is *NOT* guaranteed to hang around. It will be on 5.0, but who knows about the future? Don't use BASIC.LAUNCHER - write your own equivalent. How, you ask? Well, that's a different story... What the Finder does is treat AppleSoft BASIC programs as "data files" for the program BASIC.LAUNCHER. When you "open" an AppleSoft BASIC icon, the Finder launches BASIC.LAUNCHER after placing the pathname of the file represented by the icon in the message. [For the uninitiated, applications launched by the Finder can find the names and pathnames of any documents opened in the Finder by checking MessageCenter. The files message is of MessageType 1, and MessageData is a word (0 if the user "open"ed the documents, and 1 if the user highlighted the icon and selected "print" from the File menu) followed by an array of Pascal strings listing the pathnames of the files. A string of length zero terminates the array. This is how applications know which icon to open if you double-click on, say, a word processor document instead of on the application itself.] BASIC.LAUNCHER then retrieves the message, manually launches BASIC.SYSTEM like any ProDOS 8 program selector would (this is described in the P8 Technical Reference Manual), placing the pathname of the first file in the message in BASIC.SYSTEM's startup buffer. Not all that easy, but necessary until such time as ProDOS 8 or GS/OS can automatically place these pathnames in a startup buffer for those ProDOS 8 applications that support that convention. This didn't happen for 5.0, but if/when it does, BASIC.LAUNCHER would go away. ----------------------------------------------------------------------------- Matt Deatherage, Apple Computer, Inc. | "The opinions expressed in this tome Send PERSONAL mail ONLY (please) to: | should not be construed to imply that AppleLink PE: Matt DTS GEnie: AIIDTS | Apple Computer, Inc., or any of its CompuServe: 76703,3030 | subsidiaries, in whole or in part, Usenet: mattd@apple.com | have any opinion on any subject." UUCP: (other stuff)!ames!apple!mattd | "So there." -----------------------------------------------------------------------------