Re: error -1700
Re: error -1700
- Subject: Re: error -1700
- From: John <email@hidden>
- Date: Sun, 11 Nov 2012 11:49:27 -0500
Here is another approach:
tell application "Finder" to set winTarget to target of front window as alias
tell application "System Events" to set the_items to name of every item of winTarget
repeat with anItem in the_items
display dialog "the_item = " & anItem buttons {"Cancel", "OK"} default button "OK"
end repeat
On Sun, Nov 11, 2012 at 11:27 AM, koenig.yvan
<email@hidden> wrote:
Le 11/11/2012 à 17:10, Robert Poland <
email@hidden> a écrit :
On Nov 11, 2012, at 8:09 AM, "koenig.yvan" <
email@hidden> wrote:
Le 11/11/2012 à 15:19, Robert Poland <
email@hidden> a écrit :
(3) Why are you asking list folder to return the name of invisible items as you are skipping this invisible item later ?
(4) To get the pathname of an item we must use path of, not path to which is dedicated by Standard Additions to a well defined list of items.
Recommended change from list.
I don't understand what you wrote.
This was from James Yost <
email@hidden>
And rewrite this bit to process aliases:
set this_info to name of item (file information of file (path to the_item))
set this_info to this_info as string
It's exactly the main culprit :
![]()
tell application "System Events"
set the_items to path of disk items of folder winTarget -- by default, System Events see invisibles
repeat with i from 1 to number of items in the the_items
set the_item to item i of the_items
name of disk item the_item
display dialog "" & "the_item = " & the_item & return & return & "this_info = " & result
end repeat
end tell
As you have no real use for the index i, it may be enhanced:
I may have to unremember 47 years of computing habits for this one.
I'm quite 69 years old and was able to do that so I assume that you will be able to do the same ;-)
Yvan KOENIG (VALLAURIS, France) dimanche 11 novembre 2012 17:27:06
_______________________________________________
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
_______________________________________________
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