[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

launch



In article <9206191505.AA19287@apple.com> jlouch@apple.com writes:


   From: jlouch@apple.com
   Newsgroups: comp.lang.lisp.mcl

   This may be way off base but I wrote a quick launcher that works with
   processes!  It took all of 2 minutes to write, and was used once, so
   beware!

Good stuff. It works to launch an application. Can it be made to
supply an initial document (which is what I need to do)?

Thanks, 

-alan


   (defun launch (&optional pathname)
     (if (not pathname) (setf pathname (mac-namestring (choose-file-dialog
   ))))
     (rlet ((fsspec :fsspec)
	    (pb :launchparamblockrec
		:launchBlockId #$extendedBlock
		:launchEPBLength #$extendedBlockLen
		:LAUNCHFILEFLAGS #$launchNoFileFlags
		:launchcontrolflags #$launchContinue
		:launchAppSpec fsspec)
	    (fname :str255))
       (%put-string fname pathname)
       (#_FSMakeFSSpec  0 0 fname fsspec)
       (#_LaunchApplication pb)))