Hi folks,
I realized that the newest Safari (Mac OS 10.6.2) does not automatically focus the PDF view when one has loaded a PDF page into Safari (e.g. http://www.uni-muenster.de/Jura.itm/hoeren/materialien/Skript/Skript_Maerz2008.pdf). In an older version I could use
tell application "Safari"
tell application "System Events" to keystroke " "
end tell
to scroll automatically to the next page (by pressing space bar) after the page has been loaded. In the latest version I need to click manually into the PDF view to make Safari accepting the space bar press.
How can I bypass this problem? I tried to click automatically into the PDF view by using
tell application "Safari"
activate
tell application "System Events"
tell process "Safari"
set winPos to position of window 1
click at {(item 1 of winPos) + 50, (item 2 of winPos) + 400}
keystroke " "
end tell
end tell
end tell
This is not only ugly but also does not work. Does anyone have any idea how to make Safari scrolling my PDF file?
Thanks!
Lars