I would like to resize Safari’s window beyond the vertical screen size, but
set {b1, b2, b3, b4} to (get bounds of window 1)
tell window 1 to set bounds to {b1, b2, b3, 3000}
doesn’t work. (It works with Finder.)
I’d like to increase the vertical size so that it matches the size of the content of a web page. Then I could do a simple screen capture of that window to save its contents (all the tools out there to save long web pages that I am aware of have some drawbacks).
Thank you to everybody who answered so far, this forum is great!
@Craig: This is a good tip, but unfortunately I need way more space than hiding the toolbar and bookmarks provides.
@StefanK: I understand why you say that, but I can prove the opposite with a Finder window:
tell application "Finder"
tell window 1 to set bounds to {30, 30, 800, 3000}
end tell
Now press SHIFT-CMD-4, press SPACE to switch to window selection mode, CLICK. Voila, you have an image of a Finder window that has a height of 3000 pixels. (Maybe “window grab” would be a more accurate term than “screen grab of a window” though.)
@Martin: I already looked into it, and I believe Paparazzi! is also based on this one. But the one main obstacle of using some tools outside of Safari is that you cannot make a dump of a page that you reached by some complex navigation, because these tools cannot access Safari’s session information. E.g., try to make a dump of some search results.
The other tools I am aware of are based on PDF export, but there are still some flaws with this method (it does not look exactly like the Safari version).
If I could just create a larger Safari window with Applescript, it would be a perfect and simple solution, so all ideas are still welcome!