opening a pdf NOT using opendialog

May 31, 2010 at 8:02pm

opening a pdf NOT using opendialog

basically, I want the file to just pop open on a click, but can only make it offer a file location with opendialog. Is there another object that can make pdfs open on screen with no user choice so that the same one always opens?

#50663
May 31, 2010 at 11:40pm

If you are using a mac and know the path to the document you want to open you can use the [shell] external (google or maxobjects.com will help you find it, the UB version is probably the one you need). Send it a message formatted:

cd ~/Desktop; open “target file.pdf”

If you want the file to open with a specific application, rather than the default you can format it like this:

cd ~/Desktop; open -a TextEdit “index.html”

The first path needs to be the containing folder and the end bit is the filename.

lh

#181744
Jun 1, 2010 at 5:02am

You can also do it The Applescript Way, also using the shell object.
Then you can define which application you will use for opening the PDF.

/Thomas

– Pasted Max Patch, click to expand. –
#181745
Jun 1, 2010 at 11:00am

thanks guys

love this forum…

#181746
Jun 1, 2010 at 11:28am

am i missing something? probably…

i just use the classic maxbrowser command:

– Pasted Max Patch, click to expand. –

…pretty easy to adapt to specify a path other than the patch path.

i mean, all the other methods are great too, of course…

#181747
Jun 1, 2010 at 1:18pm

the maxbrowser trick is very nice too !
isnt it just fantastic that the same thing can be done in sooooo many ways in max ?

#181748
Jun 1, 2010 at 4:29pm

Or use the built-in browser object.

– Pasted Max Patch, click to expand. –
#181749
Jun 2, 2010 at 10:19am

To pid – I tried yours and it worked a treat, but it wont open the file when I turn it into an application. Did I do something wrong?

– Pasted Max Patch, click to expand. –
#181750
Jun 2, 2010 at 10:35am

@bob76: i’m afraid i have no idea, as applications are not my strong point. but presumably they have ‘root’ as themselves, as it were. try including the pdf in the app and not using the ‘path’ command to ‘thispatcher’ but simply the known path to the folder structure of the app?

others will be able to give more help no doubt.

#181751
Jun 2, 2010 at 12:08pm

A couple of days ago AD. posted this zip for the shell object on the forum…if you need it

the first one is the right one ;-)

Attachments:
  1. Shell_UB.zip
#181752
Jun 2, 2010 at 12:41pm

All working – thanks for the shell zip – that was just what I needed.

#181753
Dec 8, 2013 at 8:06pm

I wonder whether the PDF files can be opened using some manual PDF readers built with the help of some manual tools which can be customized by users according to our own favors to help open and view PDF files? Any ideas?

Best regards,
Arron

#275159

You must be logged in to reply to this topic.