Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!cbmvax!carolyn From: carolyn@cbmvax.UUCP Newsgroups: comp.sys.amiga Subject: Re: Did they RUN me? Message-ID: <1447@cbmvax.cbmvax.cbm.UUCP> Date: Fri, 20-Feb-87 17:04:57 EST Article-I.D.: cbmvax.1447 Posted: Fri Feb 20 17:04:57 1987 Date-Received: Sat, 21-Feb-87 10:42:12 EST References: <808@crash.CTS.COM> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner) Organization: Commodore Technology, West Chester, PA Lines: 29 In article <808@crash.CTS.COM> billk@pnet01.CTS.COM (Bill Kelly) writes: >How can I find out whether a user has RUN my program or has just executed it? By "executed" I assume you mean that the user just typed your program name at the CLI prompt. Here's the general idea (#include , ) Note that this example is only valid for programs started from CLI since programs started from Workbench do not have CommandLineInterface structures. ... TheyRanMe = FALSE; proc = (struct Process *)FindTask(NULL); if(proc->pr_CLI) /* if started from CLI */ { cli = (struct CommandLineInterface *)((proc->pr_CLI)<<2); if(cli->cli_Background) TheyRanMe = TRUE; } ... -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=