Here’s what the AppleScript for zoom in could look like:
property theZoom : 2 ^ 0.125
tell application "Skim"
tell front document
set theScale to scale factor of (get view settings)
set theScale to theZoom * theScale
if theScale > 20 then set theScale to 20
set view settings to {scale factor:theScale, auto scales:false}
end tell
end tell
And for zoom out:
property theZoom : 2 ^ -0.125
tell application "Skim"
tell front document
set theScale to scale factor of (get view settings)
set theScale to theZoom * theScale
if theScale < 0.1 then set theScale to 0.1
set view settings to {scale factor:theScale, auto scales:false}
end tell
end tell
I chose 2^0.125 because then calling it twice does the same as normal zoom in
(which effectively uses 2^0.25).
Christiaan
> On 2 Mar 2024, at 00:00, Christiaan Hofman <[email protected]> wrote:
>
>
>
>> On 1 Mar 2024, at 22:35, Toby Thurston <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> "Command +" and "Command -" are useful keybaord short cuts for zoom in and
>> zoom out, but sometimes I want finer steps to set the zoom level precisely.
>>
>> Is this an area that the app has control over?
>>
>> Would it be possible to add a modifier ("Option Command +" and "Option
>> Command -") so that the zoom level was incremented or decremented in smaller
>> steps?
>>
>> If so, what's the right way to request a feature?
>>
>> Thanks, Toby Thurston
>
>
> The right way is to add a feature request tacker.
>
> But this one would not be feasible. For one thing, zooming/out is implemented
> as it is by Apple, not by us. And moreover, there is a real problem with
> available shortcuts, which should also work on all key board layouts.
>
> What you could do though is write two AppleScripts that do such things, and
> add them to the Script menu. There is more information about the Script menu
> and how to install scripts there on the Wiki. You could then assign shortcuts
> to them in your System Preferences.
>
> Christiaan
_______________________________________________
Skim-app-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-users