Possible to trigger a DVD file from MAX?

Jul 27, 2008 at 10:18pm

Possible to trigger a DVD file from MAX?

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

#39021
Jul 28, 2008 at 11:23am

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

#136804
Jul 28, 2008 at 11:47am

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)

#136805
Jul 29, 2008 at 5:00pm

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

#136806
Jul 29, 2008 at 11:46pm

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;
#N vpatcher 365 181 1142 704;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 70 431 160 196617 Shell object by Bill Orcutt;
#P window setfont “Sans Serif” 12.;
#P user com 317 457 432 196620 8;
#K set 0 18017 29556 8294 28530 30561 29284 11822 11822;
#K end;
#P user com 317 400 432 196620 34;
#K set 0 21605 27756 8297 29813 28261 29472 29807 8304 27745 31008
29800 25888 28261 30836 8308 29281 25451 8289 28260 8307 25972 8308
26725 8310 28524 30061 25888 27749 30309 27680 29807 8241 12336 8192;
#K end;
#P user com 317 329 393 196620 14;
#K set 0 21349 29728 29800 25888 17745 8308 28448 10095 28199 8289
28260 8231 28518 26151;
#K end;
#P user com 317 278 393 196620 17;
#K set 0 29797 27756 8297 29813 28261 29472 29807 8304 27745 31008
29800 25888 28261 30836 8308 29281 25451;
#K end;
#P user com 317 236 393 196620 16;
#K set 0 29797 27756 8297 29813 28261 29472 29807 8304 27745 31008
24864 29541 27749 25460 26991 28160;
#K end;
#P user com 317 196 393 196620 9;
#K set 0 17263 28005 8290 24931 27424 29807 8282 25970 28416;
#K end;
#P user com 317 145 393 196620 10;
#K set 0 21615 26471 27749 8304 27745 31008 11552 28769 30067 25856;
#K end;
#P user com 317 89 393 196620 30;
#K set 0 20336 25966 8289 8308 29281 25451 8297 28192 26996 30062
25971 8300 26978 29281 29305 8311 26735 29541 8302 24941 25888 25455
28276 24937 28275 8226 21089 30305 27938 11776;
#K end;
#P window setfont “Sans Serif” 9.;
#P user com 7 241 179 196617 12;
#K set 0 21349 29728 29800 25888 30319 27765 28005 8303 26144 26996
30062 25971;
#K end;
#P user com 7 161 179 196617 13;
#K set 0 28528 25966 8289 28260 8291 27759 29541 8308 26725 8297
29813 28261 29440;
#K end;
#P window linecount 2;
#P message 317 111 374 196617 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’;
#B color 6;
#P window linecount 1;
#P message 317 478 317 196617 osascript -e ‘tell application
“iTunes”‘ -e ‘fast forward’ -e ‘end tell’;
#B color 5;
#P message 317 255 257 196617 osascript -e ‘tell application “itunes”
to play selection’;
#B color 6;
#P message 317 218 316 196617 osascript -e ‘tell application “itunes”
to set the player position to 0′;
#B color 2;
#P window linecount 2;
#P message 317 421 264 196617 osascript -e ‘tell application “itunes”
to play next track’ -e ‘tell application “iTunes” to set sound volume
to 100′;
#B color 6;
#P window linecount 1;
#P message 317 368 298 196617 osascript -e ‘tell application “iTunes”
to set EQ enabled to false’;
#B color 1;
#P message 317 302 264 196617 osascript -e ‘tell application “itunes”
to play next track’;
#B color 6;
#P message 7 256 307 196617 osascript -e ‘tell application “iTunes”
to set sound volume to 100′;
#B color 6;
#P number 7 274 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 7 292 301 196617 osascript -e ‘tell application “iTunes”
to set sound volume to $1′;
#B color 6;
#P message 317 166 241 196617 osascript -e ‘tell application “iTunes”
to playpause’;
#B color 14;
#P message 7 177 217 196617 osascript -e ‘tell application “iTunes”
to open’;
#B color 14;
#P message 317 349 295 196617 osascript -e ‘tell application “iTunes”
to set EQ enabled to true’;
#B color 1;
#P message 7 136 216 196617 osascript -e ‘tell application “Finder”
to open’;
#B color 5;
#P message 7 118 213 196617 osascript -e ‘tell application “Finder”
to quit’;
#B color 5;
#P message 7 194 214 196617 osascript -e ‘tell application “iTunes”
to quit’;
#B color 14;
#P newex 126 401 30 196617 shell;
#P user com 7 97 179 196617 13;
#K set 0 28528 25966 8289 28260 8291 27759 29541 8308 26725 8294
26990 25701 29184;
#K end;
#P window setfont “Sans Serif” 18.;
#P window linecount 2;
#P comment 4 23 367 196626 Here is an example to send applescript
commands to itunes via the shell object;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 70 445 160 196617 http://www.publicbeta.cx/max/;
#P connect 11 0 10 0;
#P connect 18 0 3 0;
#P connect 17 0 3 0;
#P connect 16 0 3 0;
#P connect 15 0 3 0;
#P connect 8 0 3 0;
#P connect 14 0 3 0;
#P connect 13 0 3 0;
#P connect 12 0 3 0;
#P connect 10 0 3 0;
#P connect 7 0 3 0;
#P connect 9 0 3 0;
#P connect 6 0 3 0;
#P connect 5 0 3 0;
#P connect 4 0 3 0;
#P connect 19 0 3 0;
#P pop;

#136807
Jul 30, 2008 at 12:41am

I think it is as simple as ‘play dvd’ and ‘pause dvd’

– Pasted Max Patch, click to expand. –

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.
>

#136808
Jul 30, 2008 at 2:07pm

sorry “to play dvd” and “to pause dvd”
Also, increase the delay time :

– Pasted Max Patch, click to expand. –
#136809
Jul 31, 2008 at 7:47am

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…

http://www.cycling74.com/forums/index.php?t=msg&goto=148784&rid=6985&S=5f993771ff2e6507b26a3aacb6e490c9#msg_148784

#136810
Jul 31, 2008 at 11:35am

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” : [ ]
}

}
]
}

}

#136811
Jul 31, 2008 at 11:58am

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)

#136812
Jul 31, 2008 at 2:38pm

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)
>
>

#136813
Jul 31, 2008 at 8:34pm

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?

#136814
Aug 1, 2008 at 10:20am

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?

#136815

You must be logged in to reply to this topic.