I want to make an Applescript that will display something to iChat, however I want it to get a string from a C program, is there a way for Applescript to run a C program to get this string? or is there a better way of doing this?
I do know that you can return what is echoed. So adapt appropriately.
Code:
do shell script "echo `date`"
set myReturnedText to result
if the myReturnedText is "" then
display dialog "Script was Successful." buttons {"OK"} giving up after 2 default button 1
else
display dialog "Script returned: " & myReturnedText buttons {"OK"} giving up after 2 default button 1
end if