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

Source in C, Pascal, etc. Note: apps that come with source should be included here as well as the appropriate software directory.
User avatar
Info-Mac
Administrator
Posts:13716
Joined:December 21st, 1988, 11:00 am
launch-creator.cpt - (source) get a file "double-clicked" from a running pgm

Post by Info-Mac » November 3rd, 1993, 11:00 am

Download: http://archive.info-mac.org/dev/src/lau ... ator-c.hqx

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: [email protected], [email protected]

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)

------------------------------------------------------------------------
Post Reply