Calling Applescript from Perl
:::perl
sub osascript($) { system 'osascript', map { ('-e', $_) } split(/\n/, $_[0]); }
and to use it:
:::applescript
osascript <<END;
tell application "Finder"
display dialog "Hello"
end tell
END
source
→
Just something to replace the scraps of paper on my desk.
:::perl
sub osascript($) { system 'osascript', map { ('-e', $_) } split(/\n/, $_[0]); }
and to use it:
:::applescript
osascript <<END;
tell application "Finder"
display dialog "Hello"
end tell
END