MACSCRPT Archives

December 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
john darnell <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 19 Dec 2008 12:00:01 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (38 lines)
I am trying to write a simple script to delete a file.  The script looks
like this:

set firstfile to "Macintosh HD:Users:PRG03:Library:Preferences:Suitcase
Preferences:FontTrackingFile"
if file firstfile exists then
	set myresult to delete firstfile
end if

This file exists.  The "if" test was added in an attempt to debug the
problem.  I am getting the following message when I run the script.  It
occurs on the "set first file to" line:

"Can't make file Macintosh HD:Users:PRG03:Library:Preferences:Suitcase
Preferences:FontTrackingFile into type reference."

I have also tried this with the same result:

set firstfile to file "Macintosh
HD:Users:PRG03:Library:Preferences:Suitcase
Preferences:FontTrackingFile"

I am using SD4 on OS X 10.4.8.

Any thoughts?

TIA!
R,
John A.M. Darnell
Team Leader
Walsworth Publishing Company
Brookfield, MO
John may also be reached at [log in to unmask]
 
Trivia Question:  In The Lord of the Rings, Gollum sometimes made
reference to his "birthday present," which he more often called 'My
Precious!"  To what was he referring?

ATOM RSS1 RSS2