Path: utzoo!utgpu!attcan!uunet!lll-winken!ames!ncar!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!dan From: dan@Apple.COM (Dan Allen) Newsgroups: comp.sys.mac.hypercard Subject: Re: Looking for a way to gracefully open a file Message-ID: <24884@apple.Apple.COM> Date: 27 Jan 89 20:56:33 GMT References: <170@suna.CMI.COM> Organization: Apple Computer Inc, Cupertino, CA Lines: 28 In article <170@suna.CMI.COM> shaul@suna.CMI.COM (Shaul Markovitch) writes: >I would like to be able to open a text file that resides > on an appleshare server. If the file is already open by other >users, HyperCard will alert me with a dialog box. > >I would like to be able to open the file from a script >and be able to check if an error occurred (like any normal >open command). An XCMD could be written (very few lines of C or Pascal) that would open a file. Such an XCMD would need to call FSOpen or PBOpen or Open (all variations on a common theme). All of these calls return a status result. If non-zero, then an error (such as the file already being open read/write) is returned. Such functionality is NOT build in to HyperCard. Dan Allen ** dan@apple.COM (Unix mail) ** Software Explorer ** ALLEN.DAN (AppleLink) ** HyperCard Team ** 20525 Mariani Ave. MS 22AE ** Apple Computer ** Cupertino, CA 95014 ** *********************************************************** ** Sam: "You know what they say, 'You can kill more ** ** flys with honey than with vinegar.'" ** ** Woody: "I don't mean to butt in, but you can kill ** ** the most with dead squirrels." ** ***********************************************************