I’m an utter noob to scripting in general, but just wondered if this is possible.
What I’d like is to create a small dialog box with 3 buttons (say Zoom In, Zoom Out and Cancel), when you press and hold either zoom button it invokes the zoom action in OS X (Command + Option -/+) and the Cancel button would return the screen to normal.
I’ve searched around and found this (edited a bit):
display dialog "Zoom..." buttons {"Zoom In", "Zoom Out", "Cancel"} default button 3
copy the result as list to {buttonpressed}
and also:
tell application "System Events"
tell process "UniversalAccess"
keystroke "+" using {command down, option down}
end tell
end tell
tell application "System Events"
tell process "UniversalAccess"
keystroke "-" using {command down, option down}
end tell
end tell
Now with the screen zoomed in, you only get to see a portion of it so the dialog box would need to move into view which is where the repositioning comes in. I presume an “if” clause or something similar woud be needed to constantly check that the dialog box is visible on screen.
I don’t know if it’s possible to find the boundaries of the screen when zoomed in or if a “click and hold” type action/variable can be made as zooming would otherwise mean clicking loads of times on the button, but this seems as good as any place to ask
The reason I’m doing/want this is because I’d like to zoom in/out with only my Apple bluetooth mouse (old version, only 1 button and no scrollwheel) and so the only scenerio I can think of that would work is the proposed idea above. Though if anyone else has a better idea I’d like to know. I use the option of the zoomed screen following the mouse pointer, if that helps/conplicates things.
From what I’ve searched and found so far, I may need to use Quickeys.
Thanks for any info.
Model: iMac G5 1.8Ghz
Browser: Firefox 2.0.0.1
Operating System: Mac OS X (10.4)