Applescript and C

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

  1. Holmes89 macrumors regular

    Holmes89

    Joined:
    Mar 6, 2008
    Location:
    Pittsburgh, PA
    #1
    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

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #2
    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
    
     

Share This Page