Reputation: 11
I've got some AppleScript code in a short script someone asked me to edit:
repeat with i from 1 to nDirs
set impf to folder i of importFolder
my convertFolder(impf,exportFolder,userValue)
end repeat
Whenever I try to save it or compile it, though, the AppleScript editor tells me "Syntax error: expected end of line but found identifier" while pointing to the little 'i'. Is my syntax for the binding of impf incorrect? How can I get this script compiling?
Upvotes: 0
Views: 2587
Reputation: 6516
Change folder
to item
.
I'm assuming you want to only "convert" folders, so add "error-checking" (in this case, folder-checking) before calling convertFolder
...
if (impf as string) ends with ":" then my convertFolder(impg, exportFolder, uservalue)
--Alias references ending with a ':' indicate that the item is a folder
Upvotes: 0