A bug (was Re: make new folder)
A bug (was Re: make new folder)
- Subject: A bug (was Re: make new folder)
- From: deivy petrescu <email@hidden>
- Date: Mon, 2 Jun 2008 11:07:00 -0400
On Jun 2, 2008, at 9:18, Luther Fuller wrote:
Thanks for all your comments. I got the script to work late last
night. I eliminated the problem by not using variables created in
System Events within Finder and vv. The problem is that the folder
"background" is invisible and only System Events can handle it. So ...
tell application "System Events"
if (exists folder "background" of container of pictFile) then
set visible of (folder "background" of container of pictFile) to
true
end if
end tell
tell application "Finder"
-- move files into or outof background folder
-- and other stuff
end tell
do shell script "chflags hidden " & hiddenPath
tell application "Finder" to open window of folderRef
Now, I still have one more odd little problem. See new thread.
I was looking into this when I stumble in something I'd call a big bug.
I was looking for a way to dissociate hFolder and System Events. I
found a way, but in the process I got something really bad...
The work around for the problem above, assuming background is visible:
<script>
set aaa to POSIX file "/Users/deivy/Desktop/testanu.txt" as file
specification
tell application "System Events"
set hFolder to folder "/Users/deivy/Desktop/background/"
set hFolder to (POSIX path of hFolder)
end tell
set hFolder to POSIX file hFolder
tell application "Finder" to move aaa to alias hFolder
</script>
So make hFolder into posix path inside the tell System events
and make hFolder posix file hFolder outside the tell System Events
block.
This is Fine. However, look at the path of hFolder, now instead of
set hFolder to POSIX file hFolder
write
set hFolder to hFolder as file specification
Check the path you get.
Compare it to the first line (set aaa to...).
This is really weird and very bad, who called SE into the picture?
Deivy
_______________________________________________
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