Mac OS X
Q: Pass variable to tell handle
I have a tell handle that is in handler and after the tell I can't pass a variable into it. How can I do this?
Many Thanks
Matt
In Short
on findNameInCsv(f, BrandName)
tell _split(",", t)
--do something
log {BrandName} --I can't get this line to appear after the last tell?
end tell
end findNameInCsv
on _split(d, t)
return tt
end _split
iMac, OS X Mavericks (10.9.4)
Posted on Aug 26, 2016 1:09 AM
by Hiroto,Solvedanswer
Hello
It seems a little too short for a description of the problem... I'd guess you're getting an error such as:
tell {1, 2, 3}
log "abc" --> error -1708 OSAMessageNotUnderstood : "{1, 2, 3} doesn’t understand the log message."
end tell
in which case, you need to tell me to log or tell current application to log, such as:
tell {1, 2, 3}
tell me to log "abc"
end tell
tell {1, 2, 3}
tell current application to log "abc"
end tell
In your script, use log command like this:
on findNameInCsv(f, BrandName)
tell _split(",", t)
--do something
tell me to log BrandName
end tell
end findNameInCsv
Regards,
H
Posted on Aug 26, 2016 7:00 AM