I would like to save a few keystrokes when I print web materials as PDF to EagleFiler. I am using Firefox with Readability 2 (a.k.a Clippable) bookmarklet. Here is a script that I put together but it will not work. Any help would be appreciated. Much thanks, SL
tell application “System Events”
tell window of process “Firefox”
keystroke “p” using {command down}
click (menu button “PDF” of window 1)
click (menu item 9 of menu of menu button “PDF” of window 1)
delay 2
keystroke return
delay 10
end tell
end tell
Here’s a script for Firefox:
tell application "System Events"
tell application process "Firefox"
click menu item "Print…" of menu "File" of menu bar 1
delay 2
tell window 1 -- Firefox doesn't use a sheet
tell menu button "PDF"
click
delay 2
click menu item "Save PDF to EagleFiler" of menu 1
end tell
end tell
end tell
end tell
and one for Safari:
tell application "System Events"
tell application process "Safari"
click menu item "Print…" of menu "File" of menu bar 1
delay 2
tell sheet 1 of window 1
tell menu button "PDF"
click
delay 2
click menu item "Save PDF to EagleFiler" of menu 1
end tell
end tell
end tell
end tell
You can use FastScripts to assign a keyboard shortcut.