- Code: Select all
try
tell application "Finder"
set displayProperties to (get properties of theFile)
end tell
display dialog displayProperties
on error
display dialog "Didn't Work"
end try
However, I get an error. The console messages are as follows:
- Code: Select all
2012-12-29 20:51:18.644 hazelworker[50217] Processing folder Clients (forced)
2012-12-29 20:51:20.721 hazelworker[50217] 2012_12_26_14_24_19.pdf: Rule Change Name to Keywords matched.
2012-12-29 20:51:21.726 hazelworker[50217] [Error] AppleScript failed: Error executing AppleScript on file /Volumes/Snow Leprd/Data/Clients/2012_12_26_14_24_19.pdf.
2012-12-29 20:51:21.728 hazelworker[50217] AppleScript error: {
NSLocalizedDescription = "No user interaction allowed.";
NSLocalizedFailureReason = "No user interaction allowed.";
OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: [0x0,2 \"hazelworker\"]>";
OSAScriptErrorAppNameKey = hazelworker;
OSAScriptErrorBriefMessageKey = "No user interaction allowed.";
OSAScriptErrorMessageKey = "No user interaction allowed.";
OSAScriptErrorNumberKey = "-1713";
OSAScriptErrorRangeKey = "NSRange: {0, 0}";
}
2012-12-29 20:51:22.047 hazelworker[50217] Done processing folder Clients
Ultimately, I would like to know what is causing the error so I don't make the same mistake in the future, as well as what code I would actually need for this rule. For the rule, I see the most straightforward way is to make the name of the file reflect the keywords, and then see if the name of the file matches up with another folder in another rule. I would be really happy if I could sort into the appropriate subfolder directly with the keywords, but I don't think I could do that directly.
Thank you for any help.
Bryan