Pass Parameters to Applescript

Discussion in 'Mac Programming' started by gmayassi, Aug 2, 2010.

  1. gmayassi macrumors newbie

    Joined:
    Aug 2, 2010
    #1
    Hi Guru's
    How to pass parameters from external applications e.g. Filemaker to an applescript?

    Sample Script:
    =====
    tell application "iCal"
    tell calendar "Work"
    make new todo at end with properties {description:TDDesc, summary:TDName, due date: DDate}
    end tell
    end tell
    =====

    Where TDDesc, TDName and DDate are global parameters that are defined in the external application.

    Thanks & regards

    Gus
     
  2. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
    from "man osascript":
    So it looks like if you invoke your script via osascript this is possible. You won't have direct access to variables in your external program, but if your external program can run commands (via C's system or something similar) you should be able to compose your command and add these variables as arguments.

    -Lee
     

Share This Page