If a macro begins with the string

--AppleScript
or
--AppleScript direct

then the resulting applescript code will run when the Macro is chosen. For example, consider the macro titled "View pdf with Acrobat." Choosing this macro when the source file is active (and the pdf file has been created) will start Adobe Acrobat Reader and open the output pdf file in that program. The corresponding applescript code reads

--AppleScript direct
tell application "Acrobat Reader 5.0"

activate
open POSIX file #PDFPATH#

end tell

Commands beginning with "--AppleScript direct" are run directly by TeXShop. During the time this applescript is running, TeXShop's event loop is not active. Consequently, the script cannot call TeXShop to perform an action which might require user input. For example, it cannot ask TeXShop to run LaTeX, because if the LaTeX file has an error, the console will appear and wait for user input, but such input would not be recognized.

Commands beginning with "--AppleScript" are run by a small auxiliary program in the TeXShop application bundle. Such commands can ask TeXShop to perform actions which might require user input, because in that case the auxiliary program will temporarily halt but TeXShop will remain active.

Thus the syntax "--AppleScript direct" is appropriate for routine macros, but "--AppleScript" may be needed for fancy ones.

Macros Help
AppleScript Macros