Re: Detecting Default PDF reader/writer
Re: Detecting Default PDF reader/writer
- Subject: Re: Detecting Default PDF reader/writer
- From: Craig Sutherland <email@hidden>
- Date: Fri, 23 May 2003 19:09:38 -0500
Each file still has a file creator property as well as a default file
property. To examine these for a file here is some code:
code
set FileProps to {}
set FileToExamine to choose file
set FileProps to info for FileToExamine
FileProps
end code
After running this script and choosing a PDF file when prompted you
will see a list of records in the Result window. These are the
properties and their values for the file. If you chose an Acrobat PDF,
the file creator property will be '"CARO" and the default application
property will be the path to the Acrobat application as an alias.
Repeating this, but selecting a Preview document, will show file
creator as " " and the default application is the path to Preview as
an alias.
Just to explore a bit, I used the Get Info command in Finder and the
Open With pane(?) to change the application that opens the selected
file. I changed an Acrobat document so it would be opened with Preview.
Ran the script, and the file creator remained "CARO", but the default
application changed to the path to Preview.app as alias.
So, a PDF can be opened by several different apps. This makes obvious
sense, because that is what the PDF concept is all about. If you want
to open a PDF file using the information contained in that file to
determine the opening application, we're off to the races. Very doable.
What do you need to do that prompted the question in the first place?
Craig
On Friday, May 23, 2003, at 09:40 AM, Courtney Moore wrote:
>
On 5/23/03 8:46 AM, "Ben Waldie" <email@hidden> wrote:
>
>
> Courtney,
>
>
>
> On Thursday, May 22, 2003, at 04:05 PM, Courtney Moore wrote:
>
>
>
>> I am using OS 10.2.6 and would like to write a script that will
>
>> detect
>
>> what
>
>> the default PDF reader/writer is set to. Does anyone have any idea
>
>> of
>
>> how
>
>> to do this?
>
>
>
> You should be able to do this by analyzing the XML data in the
>
> "com.apple.LaunchServices.plist" file, located in the
>
> "Users/Username/Library/Preferences/" folder.
>
>
>
> For more information about what to look for specifically in this file,
>
> you may also want to read the discussion posting, which contains
>
> information about manually changing the default PDF viewing
>
> application... http://discussions.info.apple.com/WebX?128@@.3bbbbebf
>
>
>
> - Ben
>
>
>
> Benjamin S. Waldie
>
> Automated Workflows, LLC
>
> =============================================
>
> AppleScript and Workflow Automation
>
> Consulting - <http://www.automatedworkflows.com>
>
> AppleScript Info - <http://www.applescriptguru.com>
>
> AppleScript Training - <http://www.applescripttraining.com>
>
> =============================================
>
>
>
>
>
> Thanks,
>
>
>
> - Ben
>
>
>
> Benjamin S. Waldie
>
> Automated Workflows, LLC
>
> =============================================
>
> AppleScript and Workflow Automation
>
> Consulting - <http://www.automatedworkflows.com>
>
> AppleScript Info - <http://www.applescriptguru.com>
>
> AppleScript Training - <http://www.applescripttraining.com>
>
> =============================================
>
> _______________________________________________
>
> applescript-users mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/applescript-users
>
> Do not post admin requests to the list. They will be ignored.
>
>
>
Thank you for your feedback.
>
I did not find anything in the preferences that related to the PDF
>
viewing.
>
I also did take a look at the link you sent me be I still do not know
>
how to
>
script the detecting or even modifying your default PDF viewer. Do
>
you
>
have any advice?
>
Thanks much
>
Courtney
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.