[comp.sys.mac.hypercard] open file

musa@cs.arizona.edu (Musa J. Jafar) (10/28/90)

Hello there, I have trouble in opening a file from inside HC.
I am new to HC, I tried some thing like this
open file "Genes.List"
It did not take it: let us say my file is in the
floopy drive whos name is Assignements
then how to tell HC. to go to the drive Assignements and open
the file Genes.List

I know it is some where in a Mac/HC book
Thanks

kamins@kumr.UUCP (Scot Kamins) (10/29/90)

In article <484@caslon.cs.arizona.edu> musa@cs.arizona.edu (Musa J. Jafar) writes:
>floopy drive whos name is Assignements
>then how to tell HC. to go to the drive Assignements and open
>the file Genes.List

This handler should do it:

on getGenesList
  put "Assignements:Genes.List" into myFile
  open file myFile
  -- add code here to have your way with myFile
  close file myFile
end getGenesList



Hope this helps.

-- 
Scot Kamins         Co-author, "HyperTalk 2.0: The Book"
(415) 282-8872                        (with Dan Winkler)      
671 28th Street            San Francisco           94131
uunet!hoptoad!kumr!kamins                kamins@wet.UUCP

taylorj@yvax.byu.edu (10/30/90)

In <484@caslon.cs.arizona.edu>, musa@cs.arizona.edu (Musa J. Jafar) writes:

>Hello there, I have trouble in opening a file from inside HC.
>I am new to HC, I tried some thing like this
>open file "Genes.List"
>It did not take it: let us say my file is in the
>floopy drive whos name is Assignements
 ^^^^^^
>then how to tell HC. to go to the drive Assignements and open
>the file Genes.List

Well that's your problem.  When you're accessing a disk in the floopy drive
you have to use the "oopen" command instead of the "open" command :-))).


Sorry, couldn't resist!

Actually, there is a solution to this:
1) Prefix the filename with the name of the disk.  Instead of "Genes.List"
use "Assignements:Genes.List".


Jim Taylor
Microcomputer Support for Curriculum  |
Brigham Young University              |  Bitnet: taylorj@byuvax.bitnet
101 HRCB, Provo, UT  84602            |  Internet: taylorj@yvax.byu.edu