Page 1 of 1

log and display notification not working

PostPosted: Thu Oct 02, 2014 6:59 pm
by dworsham
I have a rule that executes an embedded AppleScript. I'm trying to get information about what's going on during the execution of the script, so I've tried using log statements and display notification statements. Neither has any result. They work fine when I run the script in AppleScript Editor, though.

I've even stripped the script down to a single log statement or a single display notification statement. No joy.

Any thoughts?

Re: log and display notification not working

PostPosted: Fri Oct 03, 2014 12:35 pm
by Mr_Noodle
Not sure which log statement you are using, but display (which brings up UI) must be done from the context of a GUI program. The easiest way to do this is to wrap it in a "tell application "System Events"...end tell" block.

Re: log and display notification not working

PostPosted: Fri Oct 03, 2014 6:47 pm
by dworsham
Unfortunately, I did try that. I've tried (I also tried adding delay 1):
tell application "System Events"
display notification "test" with title "test"
end tell

and:
log ("test")

Re: log and display notification not working

PostPosted: Mon Oct 06, 2014 11:03 am
by Mr_Noodle
Not familiar with those specific commands but have you tried displaying a dialog? I know I've done that specifically and it works.

According to this, log() only works in the editor: http://stackoverflow.com/questions/1365 ... pplescript

It shows some alternate ways to log.