Page 1 of 1

how do i log a variable value?

PostPosted: Sun Dec 18, 2005 12:42 pm
by dtich
what is the as syntax to write the value of a var to the log?

i'm trying stuff, but getting var not defined errors.

tia.

PostPosted: Sun Dec 18, 2005 3:14 pm
by ajturner
This should work

Code: Select all
   on LogAllVars()
      repeat with curVariable in variables
         set logMsg to name of curVariable & " = " & value of curVariable
         log logMsg using type "Variable"
      end repeat
   end LogAllVars


You then can call LogAllVars() from an embedded Applescript.