Re: Difficulty Opening a Text File in BBEdit
Re: Difficulty Opening a Text File in BBEdit
- Subject: Re: Difficulty Opening a Text File in BBEdit
- From: "Arthur J. Knapp" <email@hidden>
- Date: Tue, 27 Aug 2002 15:20:24 -0400
>
Date: Tue, 27 Aug 2002 14:16:16 -0400
>
Subject: Difficulty Opening a Text File in BBEdit
>
From: Sean Mills <email@hidden>
>
I'm try to copy a log file to the desktop and then view it in BBEdit, but my
>
Mac keeps trying to open it in SimpleText, which wouldn't be too bad, except
>
set logPath to (path to preferences as string) & "log.txt"
>
tell application "Finder"
>
set logCopy to duplicate alias logPath to (path to desktop) replacing yes
logCopy will be a Finder object, (because it is returned from a Finder
command). Coerce it to a normal value:
set logCopy to logCopy as alias
>
tell application "BBEdit 6.1"
>
open logCopy
One has to maintain a constant vigilance to ensure that only the
Finder works with Finder objects, because nothing else does.
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
a r t h u r @ s t e l l a r v i s i o n s . c o m
}
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.