2013-10-10 18:52:05 -04:00
|
|
|
! Copyright (C) 2013 John Benediktsson
|
|
|
|
! See http://factorcode.org/license.txt for BSD license
|
|
|
|
|
2013-10-11 11:17:25 -04:00
|
|
|
USING: cocoa cocoa.application cocoa.classes kernel parser
|
|
|
|
multiline words ;
|
2013-10-10 18:52:05 -04:00
|
|
|
|
|
|
|
IN: cocoa.apple-script
|
|
|
|
|
|
|
|
: run-apple-script ( str -- )
|
2017-08-26 15:55:18 -04:00
|
|
|
[ NSAppleScript send\ alloc ] dip
|
|
|
|
<NSString> send\ initWithSource: send\ autorelease
|
|
|
|
f send\ executeAndReturnError: drop ;
|
2013-10-11 11:17:25 -04:00
|
|
|
|
2017-08-26 15:20:04 -04:00
|
|
|
SYNTAX: \APPLESCRIPT:
|
2017-08-05 23:33:47 -04:00
|
|
|
scan-new-word scan-object
|
2013-10-11 11:17:25 -04:00
|
|
|
[ run-apple-script ] curry ( -- ) define-declared ;
|