Name
using terms from end [using terms from]
Syntax
Tell app "Finder" of machine "eppc://192.168.0.2" Using terms from app "Finder" Get largest free block End using terms from End tell
Description
This block structure allows the scripter to compile a script using
local applications and to have the option to run the script on remote
machines using a TCP/IP or AppleTalk network. Chapter 25
, describes how to use the
Mac’s powerful new program linking technology to run
distributed AppleScripts over TCP/IP networks. using terms from
is new to AppleScript 1.4. Similar to the
tell
block, it takes an application object as a
parameter, as in:
using terms from app "Finder"
You use this construct to help avoid the display of the Script Editor
dialog box that asks for the location of the target application in a
tell
block. This dialog box usually displays when
the script is first compiled and then whenever the script is executed
on a different machine. If you have not encountered this dialog box
yet during AppleScript hacking, then you are either lucky or just
haven’t done very much AppleScripting.
Examples
using terms from
is best illustrated with this
example, which dynamically targets whatever machine you want, but
compiles using terms from the local machine:
set theMachine to "eppc://" & the text returned of¬ (display dialog "Enter your IP address:" default answer "") try tell application "Finder" of machine theMachine using terms from application "Finder" set freeMem to (round (largest free ...
Get AppleScript in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.