Applescript and C

Discussion in 'Mac Programming' started by Holmes89, Sep 16, 2009.

  1. Holmes89 macrumors regular


    Mar 6, 2008
    Pittsburgh, PA
    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?
  2. xStep macrumors 68000

    Jan 28, 2003
    Less lost in L.A.
    I do know that you can return what is echoed. So adapt appropriately.

    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
    	display dialog "Script returned: " & myReturnedText buttons {"OK"} giving up after 2 default button 1
    end if

Share This Page