Re: Can't get every document file of every folder of startup disk whose creator type = "MSIE"
Re: Can't get every document file of every folder of startup disk whose creator type = "MSIE"
- Subject: Re: Can't get every document file of every folder of startup disk whose creator type = "MSIE"
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 18 Dec 2006 15:09:20 -0500
Well, the Finder dictionary says nothing about being able to get the
items of a folder satisfying a test. In general, "whose" is not
something that AS handles for you, but something each app must support
directly. I thought the Finder did support that there, but ...
You could do something like this:
tell application "Finder"
set rawList to every document file of every folder of the startup
disk as alias list
set theList to {}
repeat with aFile in rawList
if aFile is document file and creator type of aFile is "MSIE" then
set the end of theList to aFile
end if
end repeat
end tell
theList
On 12/18/06, Bill Hernandez <email@hidden> wrote:
tell application "Finder"
-- Find any Explorer HTML documents
-- ALL OF THESE GENERATE THE FOLLOWING ERROR
-- Finder got an error: Can't get every document file of every
folder of startup disk whose creator type = "MSIE"
-- set aList to get (every document file of every folder of the
startup disk) whose {creator type:"MSIE"}
-- set aList to get (every document file of every folder of the
startup disk) whose (creator type) is "MSIE"
-- set aList to get (every document file of every folder of the
startup disk) whose (creator type is "MSIE")
set aList to get (every document file of every folder of the startup
disk) whose (creator type is "MSIE")
repeat with f_ref in aList
set the (creator type) of f_ref to "sfri" -- Change the creator
type to Safari
end repeat
end tell
Any ideas why this does not work ?
TIA
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden
--
Mark J. Reed <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/mailman//archives/applescript-users
This email sent to email@hidden