Created
February 7, 2010 09:29
-
-
Save hui/297343 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using terms from application "Google Chrome" | |
tell application "Google Chrome" | |
activate | |
display dialog "Please select a size." buttons {"640 x 480", "800 x 600", "1024 x 768"} with icon note | |
set button_pressed to the button returned of the result | |
if button_pressed is "640 x 480" then | |
set x_size to 640 | |
set y_size to 480 | |
else if button_pressed is "800 x 600" then | |
set x_size to 800 | |
set y_size to 600 | |
else if button_pressed is "1024 x 768" then | |
set x_size to 1024 | |
set y_size to 768 | |
end if | |
tell front window | |
set OrigBounds to bounds | |
set bounds to {(item 1 of OrigBounds), (item 2 of OrigBounds), (item 1 of OrigBounds) + x_size, (item 2 of OrigBounds) + y_size} | |
end tell | |
end tell | |
end using terms from |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment