Re: A bug (was Re: make new folder)
Re: A bug (was Re: make new folder)
- Subject: Re: A bug (was Re: make new folder)
- From: Luther Fuller <email@hidden>
- Date: Mon, 2 Jun 2008 15:48:42 -0500
I just noticed that while my script now works well in Leopard, it does
not work in Tiger because
do shell script "chflags hidden " & hiddenPath
does not know about 'hidden'. (?) So, why not try System Events again.
I tried this ...
tell application "System Events"
POSIX path of (container of newPictFile)
set visible of the result to false
end tell
And got ... Error = -10006, Can't set visible of "... pathname ... /
hiddenpict" to false. And I tried other ways of getting the path to
the hiddenpict folder, but always System Events errors this code. I've
tried using '... as alias' and other variants, but always an error of
some form. I then tried ...
tell application "System Events"
set visible of (container of newPictFile) to false
end tell
which works in Leopard, but Tiger complains (it can't make something
into an alias).
I have absolutely no problem with ...
set visible of (folder folderName of dropItem) to true
It just works. Once 'true' is changed to 'false', the errors begin.
Perhaps this provides someone insight into what is happening.
On Jun 2, 2008, at 1:38 PM, Luther Fuller wrote:
I noticed that I got an error from a line inside a 'tell application
"Finder"' block, but the error message was from "System Events", a
preceding block. I didn't follow-up on this because at that point I
was searching for a way to get my script to work. Now it works! And
I'm tired. There may be a problem or bug here, but I'm working on
something else at the moment.
On Jun 2, 2008, at 12:00 PM, Paul Berkowitz wrote:
On 6/2/08 9:44 AM, "Luther Fuller" <email@hidden> wrote:
And, yes, there seems to be a problem with Finder and
System Events not being able to share variables.
If the variable represents an object (file, folder, etc.) that
would make
sense. But have you tried first coercing 'as alias' before setting
the
variable to it? If you can do that, I think you ought to be able to
share
the variable.
_______________________________________________
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