Possible to trigger a DVD file from MAX?


    Jul 27 2008 | 10:18 pm
    I'm creating a simple .mov playback patch for a video screening at Tate Britain (not the most amazing technical feat, but bearing in mind the auspicious venue I want to do an appropriately good job).
    There is a film to be shown that although authorised to be shown, has the condition attached that it must not be extracted from the DVD. I know this is lunacy and that the obvious solution is to convert it, but it can not be done, so is there a way to trigger a DVD playback? I read a post about executing an applescript - is this the only way? (I've not used apple script before)
    Thanks in advance

    • Jul 28 2008 | 11:23 am
      Joseph Bell schrieb:
      > I read a post about executing an applescript - is this the only way?
      > (I've not used apple script before)
      Don't know if its the only way, but certainly a valid one. Other
      possibilities are within jitter, to find the file to play could be done
      with a simple path to the DVD. The experts for these questions though,
      lurk around in the jitter formum, I'd search the archives...
      Stefan
      --
      Stefan Tiedje------------x-------
      --_____-----------|--------------
      --(_|_ ----|-----|-----()-------
      -- _|_)----|-----()--------------
      ----------()--------www.ccmix.com
    • Jul 28 2008 | 11:47 am
      For DVDs that are burnt as data disks, you can just read the files as
      if they were on a hard drive. however, for an authored dvd, i think
      applescript is the only way to go. you can call applescript through
      the shell object using the osascript command. something as simple as
      this could work:
      osascript -e 'tell application "DVD Player" to play dvd'
      ~s
      >> I read a post about executing an applescript - is this the only way?
      >> (I've not used apple script before)
    • Jul 29 2008 | 5:00 pm
      Thanks for the suggestion - I got the external and am now delving into the applescript. Any more advice or help from anyone would be much appreciated
    • Jul 29 2008 | 11:46 pm
      I have got to the stage of activating DVD Player but cannot get past that stage and make it play/stop.
      There was a post made by Philippe OLLIVIER that has excellent Applescript control, but I dont quite understand the intricacies of using DVD PLayer & Applescript, and still cant get mine to work.
      Should anyone want to take a peek here is my code:
      {
      "patcher" : {
      "fileversion" : 1,
      "rect" : [ 1486.0, 427.0, 750.0, 527.0 ],
      "bglocked" : 0,
      "defrect" : [ 1486.0, 427.0, 750.0, 527.0 ],
      "openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
      "openinpresentation" : 0,
      "default_fontsize" : 12.0,
      "default_fontface" : 0,
      "default_fontname" : "Arial",
      "gridonopen" : 0,
      "gridsize" : [ 15.0, 15.0 ],
      "gridsnaponopen" : 0,
      "toolbarvisible" : 1,
      "boxanimatetime" : 200,
      "imprint" : 0,
      "metadata" : [ ],
      "boxes" : [ {
      "box" : {
      "maxclass" : "newobj",
      "text" : "print",
      "patching_rect" : [ 149.0, 379.0, 34.0, 20.0 ],
      "fontsize" : 12.0,
      "numinlets" : 1,
      "numoutlets" : 0,
      "id" : "obj-16",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "print",
      "patching_rect" : [ 62.0, 478.0, 34.0, 20.0 ],
      "fontsize" : 12.0,
      "numinlets" : 1,
      "numoutlets" : 0,
      "id" : "obj-13",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "' tell application |DVD Player| click menu item |Play| of menu |Controls| of menu bar 1'",
      "outlettype" : [ "" ],
      "patching_rect" : [ 50.0, 160.0, 351.0, 15.0 ],
      "fontsize" : 9.0,
      "numinlets" : 2,
      "numoutlets" : 1,
      "id" : "obj-12",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "prepend osascript 2>&1 -e",
      "outlettype" : [ "" ],
      "patching_rect" : [ 20.0, 194.0, 116.0, 17.0 ],
      "fontsize" : 9.0,
      "color" : [ 1.0, 0.890196, 0.090196, 1.0 ],
      "numinlets" : 1,
      "numoutlets" : 1,
      "id" : "obj-1",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "'tell application |DVD Player| to activate'",
      "outlettype" : [ "" ],
      "patching_rect" : [ 20.0, 105.0, 169.0, 15.0 ],
      "fontsize" : 9.0,
      "numinlets" : 2,
      "numoutlets" : 1,
      "id" : "obj-2",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "del 200",
      "outlettype" : [ "bang" ],
      "patching_rect" : [ 35.0, 71.0, 40.0, 17.0 ],
      "fontsize" : 9.0,
      "numinlets" : 2,
      "numoutlets" : 1,
      "id" : "obj-3",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "button",
      "fgcolor" : [ 0.611765, 0.701961, 1.0, 1.0 ],
      "outlettype" : [ "bang" ],
      "patching_rect" : [ 20.0, 25.0, 25.0, 25.0 ],
      "numinlets" : 1,
      "numoutlets" : 1,
      "id" : "obj-4"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "'tell application |System Events| to tell process |DVD Player| to tell menu bar 1 to tell menu bar item |Controls| to tell menu |Controls| to click menu item |Play|'",
      "linecount" : 2,
      "outlettype" : [ "" ],
      "patching_rect" : [ 39.0, 137.0, 594.0, 25.0 ],
      "fontsize" : 9.0,
      "numinlets" : 2,
      "numoutlets" : 1,
      "id" : "obj-5",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "34",
      "outlettype" : [ "int" ],
      "patching_rect" : [ 20.0, 268.0, 19.0, 17.0 ],
      "fontsize" : 9.0,
      "numinlets" : 2,
      "numoutlets" : 1,
      "id" : "obj-6",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "sel 124",
      "outlettype" : [ "bang", "" ],
      "patching_rect" : [ 20.0, 249.0, 45.0, 17.0 ],
      "fontsize" : 9.0,
      "numinlets" : 2,
      "numoutlets" : 2,
      "id" : "obj-7",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "itoa",
      "outlettype" : [ "int" ],
      "patching_rect" : [ 20.0, 318.0, 44.0, 17.0 ],
      "fontsize" : 9.0,
      "numinlets" : 3,
      "numoutlets" : 1,
      "id" : "obj-8",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "thresh",
      "outlettype" : [ "" ],
      "patching_rect" : [ 20.0, 299.0, 45.0, 17.0 ],
      "fontsize" : 9.0,
      "numinlets" : 2,
      "numoutlets" : 1,
      "id" : "obj-9",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "spell",
      "outlettype" : [ "int" ],
      "patching_rect" : [ 20.0, 230.0, 45.0, 17.0 ],
      "fontsize" : 9.0,
      "numinlets" : 1,
      "numoutlets" : 1,
      "id" : "obj-10",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "shell",
      "outlettype" : [ "", "bang" ],
      "patching_rect" : [ 27.0, 367.0, 45.0, 17.0 ],
      "fontsize" : 9.0,
      "numinlets" : 1,
      "numoutlets" : 2,
      "id" : "obj-11",
      "fontname" : "Arial"
      }
      }
      ],
      "lines" : [ {
      "patchline" : {
      "source" : [ "obj-4", 0 ],
      "destination" : [ "obj-2", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-8", 0 ],
      "destination" : [ "obj-11", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-9", 0 ],
      "destination" : [ "obj-8", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-7", 1 ],
      "destination" : [ "obj-9", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-6", 0 ],
      "destination" : [ "obj-9", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-7", 0 ],
      "destination" : [ "obj-6", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-10", 0 ],
      "destination" : [ "obj-7", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-4", 0 ],
      "destination" : [ "obj-3", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-3", 0 ],
      "destination" : [ "obj-5", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-5", 0 ],
      "destination" : [ "obj-1", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-12", 0 ],
      "destination" : [ "obj-1", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-2", 0 ],
      "destination" : [ "obj-1", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-1", 0 ],
      "destination" : [ "obj-10", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-11", 0 ],
      "destination" : [ "obj-13", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-8", 0 ],
      "destination" : [ "obj-16", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      ]
      }
      }
      AND HERE IS THE CODE BY PHILIPPE:
      max v2;
    • Jul 30 2008 | 12:41 am
      I think it is as simple as 'play dvd' and 'pause dvd'
      On Wed, Jul 30, 2008 at 1:46 AM, Joseph Bell wrote:
      >
      > I have got to the stage of activating DVD Player but cannot get past that stage and make it play/stop.
      >
    • Jul 30 2008 | 2:07 pm
      sorry "to play dvd" and "to pause dvd"
      Also, increase the delay time :
    • Jul 31 2008 | 7:47 am
      Thanks so much for the personalised assistance - now I can go ahead and perform this automated loop of mov & DVD files. I wonder what ways there are to do it within Jitter...
    • Jul 31 2008 | 11:35 am
      I"m in a quandry again, with simple matters I suspect. I cannot work out how to specify the file path so that I can load up a DVD VIDEO_TS file into DVD player through apple script.
      Any advice/wisdom would be appreciated
      {
      "patcher" : {
      "fileversion" : 1,
      "rect" : [ 263.0, 101.0, 736.0, 576.0 ],
      "bglocked" : 0,
      "defrect" : [ 263.0, 101.0, 736.0, 576.0 ],
      "openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
      "openinpresentation" : 0,
      "default_fontsize" : 12.0,
      "default_fontface" : 0,
      "default_fontname" : "Arial",
      "gridonopen" : 0,
      "gridsize" : [ 15.0, 15.0 ],
      "gridsnaponopen" : 0,
      "toolbarvisible" : 1,
      "boxanimatetime" : 200,
      "imprint" : 0,
      "metadata" : [ ],
      "boxes" : [ {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"DVD Player\" to open dvd video folder \"Videos/SPRAY/VIDEO_TS\" '",
      "numinlets" : 2,
      "presentation_rect" : [ 222.0, 367.0, 0.0, 0.0 ],
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 222.0, 367.0, 403.0, 15.0 ],
      "bgcolor" : [ 1.0, 0.890196, 0.090196, 1.0 ],
      "id" : "obj-23",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "'tell application |DVD Player| to open VIDEO_TS'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 200.0, 314.0, 205.0, 15.0 ],
      "id" : "obj-22",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "p bits",
      "numinlets" : 0,
      "numoutlets" : 0,
      "fontsize" : 12.0,
      "patching_rect" : [ 432.0, 208.0, 39.0, 20.0 ],
      "id" : "obj-21",
      "fontname" : "Arial",
      "patcher" : {
      "fileversion" : 1,
      "rect" : [ 54.0, 94.0, 640.0, 480.0 ],
      "bglocked" : 0,
      "defrect" : [ 54.0, 94.0, 640.0, 480.0 ],
      "openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
      "openinpresentation" : 0,
      "default_fontsize" : 12.0,
      "default_fontface" : 0,
      "default_fontname" : "Arial",
      "gridonopen" : 0,
      "gridsize" : [ 15.0, 15.0 ],
      "gridsnaponopen" : 0,
      "toolbarvisible" : 1,
      "boxanimatetime" : 200,
      "imprint" : 0,
      "metadata" : [ ],
      "boxes" : [ {
      "box" : {
      "maxclass" : "comment",
      "text" : "Shell object by Bill Orcutt",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 9.0,
      "patching_rect" : [ 85.0, 446.0, 160.0, 17.0 ],
      "id" : "obj-1",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "Fast forward....",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 12.0,
      "patching_rect" : [ 332.0, 472.0, 432.0, 20.0 ],
      "id" : "obj-2",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "Tell itunes to play the next track and set the volume level to 100 ",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 12.0,
      "patching_rect" : [ 332.0, 415.0, 432.0, 20.0 ],
      "id" : "obj-3",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "Set the EQ to 'on' and 'off'",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 12.0,
      "patching_rect" : [ 332.0, 344.0, 393.0, 20.0 ],
      "id" : "obj-4",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "tell itunes to play the next track",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 12.0,
      "patching_rect" : [ 332.0, 293.0, 393.0, 20.0 ],
      "id" : "obj-5",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "tell itunes to play a selection",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 12.0,
      "patching_rect" : [ 332.0, 251.0, 393.0, 20.0 ],
      "id" : "obj-6",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "Come back to Zero",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 12.0,
      "patching_rect" : [ 332.0, 211.0, 393.0, 20.0 ],
      "id" : "obj-7",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "Toggle play - pause",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 12.0,
      "patching_rect" : [ 332.0, 160.0, 393.0, 20.0 ],
      "id" : "obj-8",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "Open a track in itunes library whose name contains "Ravam".",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 12.0,
      "patching_rect" : [ 332.0, 104.0, 393.0, 20.0 ],
      "id" : "obj-9",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "Set the volume of itunes",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 9.0,
      "patching_rect" : [ 22.0, 256.0, 179.0, 17.0 ],
      "id" : "obj-10",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "open and close the itunes",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 9.0,
      "patching_rect" : [ 22.0, 176.0, 179.0, 17.0 ],
      "id" : "obj-11",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"iTunes\"' -e 'set mytrack to (first track of view of front window whose (name contains \"Ravam\"))' -e 'play mytrack' -e 'end tell'",
      "linecount" : 2,
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 332.0, 126.0, 374.0, 25.0 ],
      "bgcolor" : [ 0.156863, 0.8, 0.54902, 1.0 ],
      "id" : "obj-12",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"iTunes\"' -e 'fast forward' -e 'end tell'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 332.0, 493.0, 317.0, 15.0 ],
      "bgcolor" : [ 1.0, 0.890196, 0.090196, 1.0 ],
      "id" : "obj-13",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"itunes\" to play selection'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 332.0, 270.0, 257.0, 15.0 ],
      "bgcolor" : [ 0.156863, 0.8, 0.54902, 1.0 ],
      "id" : "obj-14",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"itunes\" to set the player position to 0'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 332.0, 233.0, 316.0, 15.0 ],
      "bgcolor" : [ 1.0, 0.741176, 0.611765, 1.0 ],
      "id" : "obj-15",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"itunes\" to play next track' -e 'tell application \"iTunes\" to set sound volume to 100'",
      "linecount" : 2,
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 332.0, 436.0, 264.0, 25.0 ],
      "bgcolor" : [ 0.156863, 0.8, 0.54902, 1.0 ],
      "id" : "obj-16",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"iTunes\" to set EQ enabled to false'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 332.0, 383.0, 298.0, 15.0 ],
      "bgcolor" : [ 0.8, 0.611765, 0.380392, 1.0 ],
      "id" : "obj-17",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"itunes\" to play next track'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 332.0, 317.0, 264.0, 15.0 ],
      "bgcolor" : [ 0.156863, 0.8, 0.54902, 1.0 ],
      "id" : "obj-18",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"iTunes\" to set sound volume to 100'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 22.0, 271.0, 307.0, 15.0 ],
      "bgcolor" : [ 0.156863, 0.8, 0.54902, 1.0 ],
      "id" : "obj-19",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "number",
      "numinlets" : 1,
      "triscale" : 0.9,
      "numoutlets" : 2,
      "fontsize" : 9.0,
      "outlettype" : [ "int", "bang" ],
      "htextcolor" : [ 0.870588, 0.870588, 0.870588, 1.0 ],
      "patching_rect" : [ 22.0, 289.0, 35.0, 17.0 ],
      "bgcolor" : [ 0.866667, 0.866667, 0.866667, 1.0 ],
      "id" : "obj-20",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"iTunes\" to set sound volume to $1'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 22.0, 307.0, 301.0, 15.0 ],
      "bgcolor" : [ 0.156863, 0.8, 0.54902, 1.0 ],
      "id" : "obj-21",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"iTunes\" to playpause'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 332.0, 181.0, 241.0, 15.0 ],
      "bgcolor" : [ 1.0, 0.360784, 0.682353, 1.0 ],
      "id" : "obj-22",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"iTunes\" to open'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 22.0, 192.0, 217.0, 15.0 ],
      "bgcolor" : [ 1.0, 0.360784, 0.682353, 1.0 ],
      "id" : "obj-23",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"iTunes\" to set EQ enabled to true'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 332.0, 364.0, 295.0, 15.0 ],
      "bgcolor" : [ 0.8, 0.611765, 0.380392, 1.0 ],
      "id" : "obj-24",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"Finder\" to open'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 22.0, 151.0, 216.0, 15.0 ],
      "bgcolor" : [ 1.0, 0.890196, 0.090196, 1.0 ],
      "id" : "obj-25",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"Finder\" to quit'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 22.0, 133.0, 213.0, 15.0 ],
      "bgcolor" : [ 1.0, 0.890196, 0.090196, 1.0 ],
      "id" : "obj-26",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"iTunes\" to quit'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 22.0, 209.0, 214.0, 15.0 ],
      "bgcolor" : [ 1.0, 0.360784, 0.682353, 1.0 ],
      "id" : "obj-27",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "shell",
      "numinlets" : 1,
      "numoutlets" : 2,
      "fontsize" : 9.0,
      "outlettype" : [ "", "bang" ],
      "patching_rect" : [ 141.0, 416.0, 30.0, 17.0 ],
      "id" : "obj-28",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "open and close the finder",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 9.0,
      "patching_rect" : [ 22.0, 112.0, 179.0, 17.0 ],
      "id" : "obj-29",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "Here is an example to send applescript commands to itunes via the shell object",
      "linecount" : 2,
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 18.0,
      "patching_rect" : [ 19.0, 38.0, 367.0, 48.0 ],
      "id" : "obj-30",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "comment",
      "text" : "http://www.publicbeta.cx/max/",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 9.0,
      "patching_rect" : [ 85.0, 460.0, 160.0, 17.0 ],
      "id" : "obj-31",
      "fontname" : "Arial"
      }
      }
      ],
      "lines" : [ {
      "patchline" : {
      "source" : [ "obj-20", 0 ],
      "destination" : [ "obj-21", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-13", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-14", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-15", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-16", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-23", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-17", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-18", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-19", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-21", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-24", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-22", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-25", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-26", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-27", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-12", 0 ],
      "destination" : [ "obj-28", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      ]
      }
      ,
      "saved_object_attributes" : {
      "globalpatchername" : "",
      "fontface" : 0,
      "fontsize" : 12.0,
      "default_fontface" : 0,
      "default_fontname" : "Arial",
      "default_fontsize" : 12.0,
      "fontname" : "Arial"
      }
      }
      }
      , {
      "box" : {
      "maxclass" : "button",
      "numinlets" : 1,
      "fgcolor" : [ 0.611765, 0.701961, 1.0, 1.0 ],
      "numoutlets" : 1,
      "outlettype" : [ "bang" ],
      "patching_rect" : [ 387.0, 264.0, 25.0, 25.0 ],
      "id" : "obj-20"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"DVD Player\" to open'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 342.0, 172.0, 213.0, 15.0 ],
      "bgcolor" : [ 1.0, 0.890196, 0.090196, 1.0 ],
      "id" : "obj-25",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "osascript -e 'tell application \"DVD Player\" to quit'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 327.0, 126.0, 208.0, 15.0 ],
      "bgcolor" : [ 1.0, 0.890196, 0.090196, 1.0 ],
      "id" : "obj-26",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "sel 115",
      "numinlets" : 2,
      "numoutlets" : 2,
      "fontsize" : 12.0,
      "outlettype" : [ "bang", "" ],
      "patching_rect" : [ 332.0, 55.0, 49.0, 20.0 ],
      "id" : "obj-18",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "key",
      "numinlets" : 0,
      "numoutlets" : 4,
      "fontsize" : 12.0,
      "outlettype" : [ "int", "int", "int", "int" ],
      "patching_rect" : [ 332.0, 26.0, 59.5, 20.0 ],
      "id" : "obj-19",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "sel 97",
      "numinlets" : 2,
      "numoutlets" : 2,
      "fontsize" : 12.0,
      "outlettype" : [ "bang", "" ],
      "patching_rect" : [ 263.0, 53.0, 43.0, 20.0 ],
      "id" : "obj-17",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "key",
      "numinlets" : 0,
      "numoutlets" : 4,
      "fontsize" : 12.0,
      "outlettype" : [ "int", "int", "int", "int" ],
      "patching_rect" : [ 263.0, 24.0, 59.5, 20.0 ],
      "id" : "obj-16",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "del 1000",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "bang" ],
      "patching_rect" : [ 90.0, 90.0, 45.0, 17.0 ],
      "id" : "obj-15",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "button",
      "numinlets" : 1,
      "fgcolor" : [ 0.611765, 0.701961, 1.0, 1.0 ],
      "numoutlets" : 1,
      "outlettype" : [ "bang" ],
      "patching_rect" : [ 120.0, 25.0, 25.0, 25.0 ],
      "id" : "obj-14"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "'tell application |DVD Player| to pause dvd'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 90.0, 160.0, 179.0, 15.0 ],
      "id" : "obj-12",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "print",
      "numinlets" : 1,
      "numoutlets" : 0,
      "fontsize" : 12.0,
      "patching_rect" : [ 20.0, 400.0, 34.0, 20.0 ],
      "id" : "obj-13",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "prepend osascript 2>&1 -e",
      "numinlets" : 1,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 20.0, 194.0, 116.0, 17.0 ],
      "color" : [ 1.0, 0.890196, 0.090196, 1.0 ],
      "id" : "obj-1",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "'tell application |DVD Player| to activate'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 135.0, 105.0, 169.0, 15.0 ],
      "id" : "obj-2",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "del 1000",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "bang" ],
      "patching_rect" : [ 20.0, 90.0, 45.0, 17.0 ],
      "id" : "obj-3",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "button",
      "numinlets" : 1,
      "fgcolor" : [ 0.611765, 0.701961, 1.0, 1.0 ],
      "numoutlets" : 1,
      "outlettype" : [ "bang" ],
      "patching_rect" : [ 20.0, 25.0, 25.0, 25.0 ],
      "id" : "obj-4"
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "'tell application |DVD Player| to play dvd'",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 20.0, 135.0, 171.0, 15.0 ],
      "id" : "obj-5",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "34",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "int" ],
      "patching_rect" : [ 20.0, 268.0, 19.0, 17.0 ],
      "id" : "obj-6",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "sel 124",
      "numinlets" : 2,
      "numoutlets" : 2,
      "fontsize" : 9.0,
      "outlettype" : [ "bang", "" ],
      "patching_rect" : [ 20.0, 249.0, 45.0, 17.0 ],
      "id" : "obj-7",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "itoa",
      "numinlets" : 3,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "int" ],
      "patching_rect" : [ 20.0, 318.0, 44.0, 17.0 ],
      "id" : "obj-8",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "thresh",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 20.0, 299.0, 45.0, 17.0 ],
      "id" : "obj-9",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "spell",
      "numinlets" : 1,
      "numoutlets" : 1,
      "fontsize" : 9.0,
      "outlettype" : [ "int" ],
      "patching_rect" : [ 20.0, 230.0, 45.0, 17.0 ],
      "id" : "obj-10",
      "fontname" : "Arial"
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "shell",
      "numinlets" : 1,
      "numoutlets" : 2,
      "fontsize" : 9.0,
      "outlettype" : [ "", "bang" ],
      "patching_rect" : [ 20.0, 367.0, 45.0, 17.0 ],
      "id" : "obj-11",
      "fontname" : "Arial"
      }
      }
      ],
      "lines" : [ {
      "patchline" : {
      "source" : [ "obj-23", 0 ],
      "destination" : [ "obj-11", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-17", 0 ],
      "destination" : [ "obj-20", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-25", 0 ],
      "destination" : [ "obj-11", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-26", 0 ],
      "destination" : [ "obj-11", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-18", 0 ],
      "destination" : [ "obj-26", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-17", 0 ],
      "destination" : [ "obj-25", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-19", 0 ],
      "destination" : [ "obj-18", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-16", 0 ],
      "destination" : [ "obj-17", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-12", 0 ],
      "destination" : [ "obj-1", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-4", 0 ],
      "destination" : [ "obj-2", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-8", 0 ],
      "destination" : [ "obj-11", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-9", 0 ],
      "destination" : [ "obj-8", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-7", 1 ],
      "destination" : [ "obj-9", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-6", 0 ],
      "destination" : [ "obj-9", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-7", 0 ],
      "destination" : [ "obj-6", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-10", 0 ],
      "destination" : [ "obj-7", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-5", 0 ],
      "destination" : [ "obj-1", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-2", 0 ],
      "destination" : [ "obj-1", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-1", 0 ],
      "destination" : [ "obj-10", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-11", 0 ],
      "destination" : [ "obj-13", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-14", 0 ],
      "destination" : [ "obj-2", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-15", 0 ],
      "destination" : [ "obj-12", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-14", 0 ],
      "destination" : [ "obj-15", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-3", 0 ],
      "destination" : [ "obj-5", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-4", 0 ],
      "destination" : [ "obj-3", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-22", 0 ],
      "destination" : [ "obj-1", 0 ],
      "hidden" : 0,
      "midpoints" : [ ]
      }
      }
      ]
      }
      }
    • Jul 31 2008 | 11:58 am
      The file path I specified is suspicious - I've called a UNIX file path, when I should have used an applescript, however, I still cant get it right.
      ANy idea what is wrong with the following message when sent to shell?
      osascript -e 'tell application "DVD Player" to open VIDEO_TS "Data:Videos:SPRAY:VIDEO_TS" '
      (Data is the name of my HD)
    • Jul 31 2008 | 2:38 pm
      I just had a play - it seems you need the 'file' keyword after
      'VIDEO_TS' so it makes an instance of a 'file specification' (or
      something):
      tell application ... to open VIDEO_TS file " "
      works for me.
      It's probably quicker to write and debug your scripts in the applescript
      editor and then trigger them from max, once you know they should work.
      --
      Owen
      Joseph Bell wrote:
      > The file path I specified is suspicious - I've called a UNIX file
      > path, when I should have used an applescript, however, I still cant
      > get it right.
      >
      > ANy idea what is wrong with the following message when sent to shell?
      >
      >
      > osascript -e 'tell application "DVD Player" to open VIDEO_TS
      > "Data:Videos:SPRAY:VIDEO_TS" '
      >
      >
      >
      >
      >
      > (Data is the name of my HD)
      >
      >
    • Jul 31 2008 | 8:34 pm
      I dont know what I"m doing wrong, but I cant seem to get it. Could you copy/past your message so I can have a look?
    • Aug 01 2008 | 10:20 am
      You're probably have issues escaping the quote marks - the ones around
      the script command need to be escaped to be passed onto the shell, the
      ones /inside/ the script which need to be passed on escaped, thus need
      their escape slashes also to be escaped...(bwa-ha):
      osascript -e "tell application \"DVD Player\" to open VIDEO_TS file
      \"GHOST_DOG:VIDEO_TS\"" 2>&1
      works for me with [shell]. The '2>&1' at the end gives me the stderr
      output as well, which may have variably meaningful stuff to say if it
      doesn't understand things.
      --
      O
      Joseph Bell wrote:
      > I dont know what I"m doing wrong, but I cant seem to get it. Could
      > you copy/past your message so I can have a look?