Re: pdf reader, scriptable? If not now, then when?
Re: pdf reader, scriptable? If not now, then when?
- Subject: Re: pdf reader, scriptable? If not now, then when?
- From: Jeff Shapiro <email@hidden>
- Date: Mon, 4 Apr 2005 17:06:14 -0600
- Organization: Nensha
Joshua B. Mailman was seen on 4/4/05 1:04 PM talking about:
>
> Does anyone know if there are any plans to make the OSX Preview
> application scriptable? Or for making Adobe Acrobat Reader scriptable.
>
> My mom has low vision, and I just want her to--using her voice--be able
> to open a pdf file, and say "select all" and "speak text" without using
> the keyboard or the mouse.
>
> So far as I can tell, since it's impossible to make an applescript for
> Preview or Acrobat, it cannot be done. Any ideas?
Here's a couple of scripts that I came up with to read a PDF in Adobe
Reader 7.0.
Place the scripts into the Adobe Reader folder in the Application
Speakable Items of the Speakable Items folder. (That is the Adobe
Reader folder in ~/Library/Speech/Speakable Items/Application Speakable
Items/.) The easiest way to get there is to click on the "Open
Speakable Items Folder" button in the Speech pane of System
Preferences. I suppose if you don't have an Adobe Reader folder just go
ahead an create one.
Whatever you name the script files are the voice command you will use
to invoke them.
I also tried a Pause Reading and Stop reading scripts but they only
seemed to work if the program wasn't reading anything.
You may need to change the Reader version number if you aren't using
v7.0
NOTE: Watch out for line wraps.
-- -- ---
-- Save as an applescript file
-- Name: Read to end
-- this invokes the
-- View -> Read Aloud -> Read to end of document command
--
tell application "Adobe Reader 7.0" to activate
tell application "System Events"
if UI elements enabled then
tell process "Adobe Acrobat"
keystroke "B" using {command down, shift down}
end tell
else
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check \"Enable
access for assistive devices\""
end tell
end if
end tell
-- ---------------
-- end of Read to end
-- ----------------
-- Save as an applescript file
-- Name: Read page
-- this invokes the
-- View -> Read Aloud -> Read this Page only command
--
tell application "Adobe Reader 7.0" to activate
tell application "System Events"
if UI elements enabled then
tell process "Adobe Acrobat"
keystroke "V" using {command down, shift down}
end tell
else
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check \"Enable
access for assistive devices\""
end tell
end if
end tell
-- ---------------
-- end of Read to end
-- ----------------
--
Listserv only address.
Jeff Shapiro
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden