cocoa.apple-script: adding a simple applescript runner.
parent
72edf36d7b
commit
55f72a8568
|
@ -0,0 +1,11 @@
|
||||||
|
! Copyright (C) 2013 John Benediktsson
|
||||||
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
|
|
||||||
|
USING: cocoa cocoa.application cocoa.classes kernel ;
|
||||||
|
|
||||||
|
IN: cocoa.apple-script
|
||||||
|
|
||||||
|
: run-apple-script ( str -- )
|
||||||
|
[ NSAppleScript -> alloc ] dip
|
||||||
|
<NSString> -> initWithSource: -> autorelease
|
||||||
|
f -> executeAndReturnError: drop ;
|
|
@ -0,0 +1 @@
|
||||||
|
macosx
|
|
@ -52,6 +52,7 @@ SYNTAX: IMPORT: scan-token [ ] import-objc-class ;
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"NSAlert"
|
"NSAlert"
|
||||||
|
"NSAppleScript"
|
||||||
"NSApplication"
|
"NSApplication"
|
||||||
"NSArray"
|
"NSArray"
|
||||||
"NSAutoreleasePool"
|
"NSAutoreleasePool"
|
||||||
|
|
Loading…
Reference in New Issue