Problem with folder searching script
Problem with folder searching script
- Subject: Problem with folder searching script
- From: John Goodchild <email@hidden>
- Date: 21 Oct 2004 14:33:05 -0700
Hello.
I am trying to write a script that searches the contents of a set of folders. When the script finds a folder, it processes the contents of that folder etc, etc.
I am having difficulty parsing the new folder name. The script stops with the error message "Expected a reference". Below is the basic form of the script:
on open theFolder
parseFolder(theFolder)
end open
on parseFolder(aFolder)
tell application "Finder"
set theNumItems to number of items in aFolder
end tell
repeat with i from 1 to theNumItems
tell application "Finder"
set anItem to item i of aFolder
if kind of anItem = "Folder" then
set contProc to true
else
set contProc to false
end if
end tell
if contProc then
parseFolder(anItem) -- gives error "Expected a reference"
end if
end repeat
end parseFolder
Any help with this problem would be greatly appreciated. I am using Script Editor 2.0 (v43) and AppleScript 1.9.3 running in Mac OS X 10.3.5.
Regards,
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden