Page 1 of 1

Problems with Applescript in rule

PostPosted: Sat Jan 19, 2013 10:30 am
by chobe
I'm trying to create a rule in Hazel that uses an Applescript. I want Hazel to upload a file to my specified Evernote folder and then move the file to another folder on my HD. For some reason, the script keeps repeating and the file keeps getting uploaded to Evernote over and over until I stop it. Here is the code I'm using. I appreciate any help...

tell application "Evernote"
activate
create note from file theFile notebook "Records"
end tell

I don't know if this is a problem with the script or with Hazel. Thanks for any help.

Re: Problems with Applescript in rule

PostPosted: Mon Jan 21, 2013 6:24 pm
by a_freyer
What's the rest of your rule look like?

Re: Problems with Applescript in rule

PostPosted: Tue Jan 22, 2013 1:39 pm
by Mr_Noodle
If you are the one who emailed in to support about this problem, then, for the record, the problem was that the move operation was failing because the file was being held open by another app. The suggested fix was to reverse the order of the actions so that the AppleScript would only be run after the move was successful.

If you are NOT the one who emailed with this seemingly identical problem, then, yes, as a_freyer suggested, please post your rule in full.