+\begin_layout Subsection
+AppleScript (Mac OS X)
+\end_layout
+
+\begin_layout Standard
+Desde \SpecialChar LyX
+ 2.1, \SpecialChar LyX
+ soporta interacciones básicas con AppleScript para comunicación
+ normal mediante el comando run.
+ Este comando toma un argumento directo (la
+\series bold
+function
+\series default
+ a realizar) y un argumento opcional.
+ Devuelve la salida de la función o desencadena un error con un mensaje
+ y el código.
+\end_layout
+
+\begin_layout Standard
+Ejemplo:
+\end_layout
+
+\begin_layout LyX-Code
+tell application "\SpecialChar LyX
+"
+\end_layout
+
+\begin_layout LyX-Code
+ try
+\end_layout
+
+\begin_layout LyX-Code
+ -- Stores the current file name into f
+\end_layout
+
+\begin_layout LyX-Code
+ set f to (run "server-get-filename" with argument "")
+\end_layout
+
+\begin_layout LyX-Code
+ on error the error_message number the error_number
+\end_layout
+
+\begin_layout LyX-Code
+ display dialog "Error: " & the error_number & ".
+ " ¬
+\end_layout
+
+\begin_layout LyX-Code
+ & the error_message buttons {"OK"} default button 1
+\end_layout
+
+\begin_layout LyX-Code
+ end try
+\end_layout
+
+\begin_layout LyX-Code
+end tell
+\end_layout
+