Handbook
Glossary
run-apple-script ( str -- )
Vocabulary
cocoa
.
apple-script
Inputs
str
a
string
Outputs
None
Word description
Runs the provided uncompiled AppleScript code.
Notes
Currently, return values are unsupported.
Definition
USING:
alien.c-types
cocoa.application
cocoa.classes
cocoa.messages
cocoa.runtime
kernel
;
IN:
cocoa.apple-script
:
run-apple-script
( str -- )
[
NSAppleScript
{
id
{
id
SEL
}
}
"alloc"
send
]
dip
<NSString>
{
id
{
id
SEL
id
}
}
"initWithSource:"
send
{
id
{
id
SEL
}
}
"autorelease"
send
f
{
id
{
id
SEL
void*
}
}
"executeAndReturnError:"
send
drop
;