Pass Parameters to Applescript

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

  1. gmayassi macrumors newbie

    Aug 2, 2010
    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

  2. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    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.


Share This Page