Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!genrad!decvax!ucbvax!hplabs!sdcrdcf!trwrb!cadovax!kaz From: kaz@cadovax.UUCP (Kerry Zimmerman) Newsgroups: comp.sys.amiga Subject: Re: run & path questions Message-ID: <1786@cadovax.UUCP> Date: Sun, 4-Oct-87 20:35:23 EDT Article-I.D.: cadovax.1786 Posted: Sun Oct 4 20:35:23 1987 Date-Received: Thu, 8-Oct-87 00:51:19 EDT References: <1775@cadovax.UUCP> <2454@cbmvax.UUCP> Reply-To: kaz@cadovax.UUCP (Kerry Zimmerman) Organization: Contel Business Systems, Torrance, CA Lines: 59 Keywords: run path In article <2454@cbmvax.UUCP> andy@cbmvax.UUCP (Andy Finkel) writes: >In article <1775@cadovax.UUCP> kaz@cadovax.UUCP (Kerry Zimmerman) writes: >>A couple of questions: >> >>1. Since the code >> error = Execute( "RUN whatever ...", 0L, 0L); >> always returns a success, how can your program tell if the >> program you wanted to run was found or not? > >Its a kluge, I know, but under 1.2 you can get some indication >from IoErr(); > I tried RUNning both a valid and an invalid program, and in both cases IoErr() return the same value ( 0xC4 ). So, what was the indication you referred to?? >> >>2. How can you find out what the current PATH is set to within >> a program? > >Paths are stored as a BPTR to a BCPL list stored off of the >CommandDir entry of the CommandLineInterface > I found CommandLineInterface in dosextens.h, but found no other reference to it. Please tell me how I can locate this structure from within a program. Please include a code fragment for searching the path if you can afford the time. >>3. It seems that both Execute and Run will search through the current >> PATH. Does LoadSeg also do this search, or do you have to specify >> the path in the LoadSeg call? > >LoadSeg doeesn't do this search. You'll have to do it yourself. And, >as a nice gesture for the user, I suggest that you turn off the requesters >and search quietly. (set Process->WindowPtr to -1) > Thats what I thought. Thanks for the tip, too. >andy finkel {ihnp4|seismo|allegra}!cbmvax!andy >Commodore-Amiga, Inc. > Kerry Zimmerman # {ucbvax,decvax}!trwrb!cadovax!kaz Contel Business Systems 213-323-8170 # to make rn happy # to make rn happy # to make rn happy # to make rn happy # to make rn happy # to make rn happy # to make rn happy # to make rn happy # to make rn happy # to make rn happy # to make rn happy