Info-Mac Archive Downloads: dev/src/ SourceCode

Back to dev/src/ SourceCode

launch-creator.cpt - (source) get a file "double-clicked" from a running pgm (launch-creator-c.hqx)

Download launch-creator-c.hqx (4,086 KB)


Date: Wed, 3 Nov 93 11:37:36 -0600
From: oleg@ponder.csci.unt.edu (Kiselyov Oleg)
Subject: launch-creator.cpt - (source) get a file "double-clicked" from a running pgm


What: get any file "double-clicked" from within a running program
Contents:
launcher.cc - code itself (commented)
vlauncher.cc - verification routine
Language: Symantec C++ 6.0 (though worked for Think C 5.0, too)
System: System 7.x, but probably 6.x is OK, too.
Note: needs standard environment, see myenv-notify.cpt
Comments to: oleg@ponder.csci.unt.edu, oleg@unt.edu

Explanation:
This is a simple program that, given a file name, launches an
application-creator and has it handle the file. If the file
is an application, it is launched itself. The net result is
exactly the same as if the user had double-clicked on the file.
Synopsis
void open_selection(const char * full_path_name)
Where the 'full_path_name' tells the full path name of the file that
should be "double-clicked". Though, a relative path name would do, too.
The present program achieves the magic by sending an 'Open Selection'
event to the Finder. It is significantly based on the FinderEvents
stack by Jon Pugh and Apple Computer, Inc. (C) 1991-92 Apple Computer, Inc.)
(which is written in Pascal and _very_ big and messy)

------------------------------------------------------------------------