blob: 8a4828b89df317868a7b95501c2f61a0743fa9e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
use Mac::Components;
use Mac::OSA;
use Mac::AppleEvents;
undef $/;
$applescript = OpenDefaultComponent(kOSAComponentType, "ascr") or die "AppleScript not installed";
$script = AECreateDesc "TEXT", <STDIN>;
$result = OSADoScript($applescript, $script, 0, "TEXT", 0) or die $^E;
print AEPrint($result), "\n";
AEDisposeDesc $result;
AEDisposeDesc $script;
CloseComponent $applescript;
|