The Execute an AppleScript action executes a specified AppleScript, either from a file or text. For example, say “hello”.
The results of an AppleScript can be:
AppleScripts are executed in the background via osascript. This means they are not allowed to do user interaction. You can work around this by asking an application like System Events to do the user interaction for you, for example:
tell application "System Events" activate display dialog "Hello" end tell
AppleScripts can access variables by using environment variables (using system attribute) or by talking to the Keyboard Maestro Engine. Note that AppleScript’s system attribute is not safe for international characters, although it can use code like:
set v to do shell script "echo $KMVAR_Variable"