Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

AppleScript, Growl, and permissions.

Hi,


I'm using an AppleScript in conjunction with Growl to create a new text file in Dropbox when a tagged notification is displayed, but a permission error is stopping the process. I've got read/write access to the folder, com.Growl.GrowlHelperApp (in Application Scripts) but the error's persisting. Can I alter something to fix this? The error reads:


The document “Untitled” could not be exported as “[text file].txt”. You don’t have permission. To view or change permissions, select the item in the Finder and choose File > Get Info.


I'll be using Hazel to move and eventually trash this file once it's triggered another workflow, so it's not ideal to fix each text file as it's created. I'm new to AppleScript, thanks for any help offered.

MacBook Pro with Retina display, OS X Mavericks (10.9.2)

Posted on Mar 16, 2014 6:36 AM

Reply
5 replies

Mar 16, 2014 7:16 AM in response to Frank Caggiano

Hi Frank, thanks for the reply. I should have been more clear -- it's leaving the com.Growl.GrowlHelperApp (in Application Scripts) (in Library) and going to /Dropbox, mentioned above. I've included the code below too. Thanks.


using terms from application "Growl"


on evaluate notificationwithnotification


if notification's app name contains "Watts" then

tell application "TextEdit"


activate


makenewdocument

set theDate to current date

set text of document 1 to theDate as text

save document 1 in "/Users/Joe/Dropbox/battery.txt"

end tell

end if


end evaluate notification


end using terms from

Mar 16, 2014 9:34 AM in response to joewhite1989

IS the error you reported above


The document “Untitled” could not be exported as “[text file].txt”. You don’t have permission. To view or change permissions, select the item in the Finder and choose File > Get Info.

happening when TextEdit runs the

savedocument 1 in "/Users/Joe/Dropbox/battery.txt"

line?


If so as a test try saving to someplace other then Dropbox, say your Desktop and see if the error stil occurs.


It's been a while since I used Growl, didn't realize it was still around now that Mavericks has Notifications but I don;t see anything in the code you posted that would indicate a Growl problem

AppleScript, Growl, and permissions.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.