I tried to call a simple messagebox from the console using:
osascript -e "display dialog \"hello\""
but it returns:
execution error: No user interaction allowed. (-1713)
Is there a workaround?
EDIT:
The workaround is: tell application "AppleScript Runner" to display dialog "Hello"
See this question for a solution, it contains an example that works from the console:
"No user interaction allowed" When running AppleScript in python