Hello!
I�m trying to get this script to return a value from another machine. The following works just fine from within Script Editor:
global remoteMachine, batteryVoltage
set remoteMachine to "eppc://sense.local"
using terms from application "Finder"
try
tell application "Finder" of machine remoteMachine
set batteryVoltage to (get LabJack pin AI8)
end tell
end try
end using terms from
display dialog batteryVoltage
Yet when I try and adapt it to work in Xcode:
global batteryVoltage
set remoteMachine to "eppc://sense.local"
on clicked theObject
if (name of theObject is "updateVoltage") then
using terms from application "Finder"
try
tell application "Finder" of machine remoteMachine
set batteryVoltage to (get LabJack pin AI8)
end tell
end try
end using terms from
end if
set contents of text field "batteryVoltageField" of window "mainWindow" to batteryVoltage as number
end clicked
…I get an error stating the �The variable batteryVoltage is not defined. (-2753)�
What am I doing wrong?
Thanks!!