Is there any way to access the “Print” item in Safari’s (or any other browser’s) menu bar? I’m trying to Save a webpage (actually about 1000) as a PDF and I can’t figure it out. I thought I could use GUI scripting to click Print and then click the “Save as PDF” button but it seems the entire File menu can’t be used by GUI scripting. Am I missing something here? Thanks.
UI Browser from Prefab, shows this info…
click button "Save As PDF…" of UI element 3 of sheet "Print" of window "MacScripter BBS | Applescript Forums :: View topic - GUI Scripting Question...The File Menu..."
Note: The three dots after “Save As PDF” are ellipsis (“option ;” keycombo, not three periods)
I’m sure there is a better way of doing this but assuming you have PDF services enabled, this will save the current file in Safari as a PDF on your desktop (tested in Safari 1.1.1 (v100.1) on Mac OS X 10.3.2):
Jon
[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]
Thank You! I was way off. FIrst of all, I was using “menu” instead of “sheet” and I wasn’t using the ellipsis. Awesome.
I have a Real Basic Application which is calling Applescript files to process documents.
In the applescript file, functions are written to generate events which in turn call realbasic application to do futher processing. This code is working fine with OS x but when run on the OS 9.2, it calls the OSX application and then execute the code.
If I convert the applescript file to applesingle Encoded file , will it work fine???