Standard Additions read/write and file extension
Standard Additions read/write and file extension
- Subject: Standard Additions read/write and file extension
- From: Brian Johnson <email@hidden>
- Date: Tue, 4 Sep 2007 18:53:49 -0700 (PDT)
Hi list!
I spent several hours today wrestling with something that I don't remember
knowing in a previous life, so I thought I'd ask/share. It seems that under
OS-X it matters what _extension_ a file has when it is being read using
applescript's standard read command.
I was attempting to read return-delimited lines of macroman text by reading
"before return" in a loop. If the file is named .dat, the _second_ read starts
several characters BEFORE the first return, so the loop never advances past the
first return. I couldn't figure out why, so I started building test scripts and
eventually discovered that Simply renaming the file to .txt fixes the problem.
Is this a case of applescript being "smart" ? or something else? Obviously,
I've figured a way forward for this project, but I can't help wondering.
-Brian Johnson, Dept of Architecture, University of Washington, Seattle
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden