Re: Who started me?




"Tom van Stiphout" <no.spam.tom7744@xxxxxxx> schreef in bericht news:6sm7021rbh6nqv76gp7lvp1c6q301dbbi6@xxxxxxxxxx

Now I want to know if my application was started by Launcher, or by
some other way. I would then refuse to run. My first idea was to add:
/x LaunchedByLauncher
to the command line. This macro would call a function that would set a
global variable, which I could test for in my startup code.
Alas, /x runs too late: the AutoExec macro runs first, then the /x
macro runs.

So I'm open to suggestions. How can I know who started me?

Salad gave you a good idea: You can have your launcher create some file.
But I would only delete (and force a delete...) this file when the app ends.
That way you can not only control 'who' launched your app, but also prevent the app to be started more than once from the same workstation.

Or: don't show anything on screen until your /x macro has run.
Show your mainform only from the /x macro
Or: kill the app with a timer event on a hidden form when your /x macro has not run

Arno R

.



Relevant Pages

  • Re: Who started me?
    ... My app calls ShellExecute to run the command line ... Now I want to know if my application was started by Launcher, ... the AutoExec macro runs first, then the /x ... Maybe create the existence of a file when something is launched...or with a particular name. ...
    (comp.databases.ms-access)
  • Who started me?
    ... I have a "Launcher" application that does version checking. ... copy a newer version from the server if needed, ... My app calls ShellExecute to run the command line ... the AutoExec macro runs first, then the /x ...
    (comp.databases.ms-access)
  • Re: The Dock through the years
    ... Launcher window, click on it, and there you are. ... I can't even resolve icons display in the dock into `That's one icon ... got my Mighty Mouse set to bring up the app switcher on a squeeze. ...
    (uk.comp.sys.mac)
  • Re: Belated look at the OSXhints April Fools front page
    ... Apple provided Launcher, which lived in the Control Panels folder. ... off the app switcher functions, not to mention giving us back ... It's not the sort of judgement that I make. ...
    (uk.comp.sys.mac)
  • Re: Aperture - love it.
    ... >> You don't have to be in the 99% group for the app to fail you. ... >>>Tell me what aperture setting is optimal for a macro to maximize focus ... you say "What kind of support do I need to touch up a few ... Those are not "Editing" functions. ...
    (comp.sys.mac.advocacy)