For those who are copying and pasting, be sure to us >= instead of the character that AppleScript uses post-compile. That is:

2WindowsPageDown.scpt is now:

tell application "Skim"
        tell document 1
                set p1 to index of current page
                set n1 to count of pages
                if p1 < n1 then
                        go to page (p1 + 1)
                end if
        end tell
        if (count of documents) >= 2 then
                tell document 2
                        set p2 to index of current page
                        set n2 to count of pages
                        if p2 < n2 then
                                go to page (p2 + 1)
                        end if
                end tell
        end if
end tell

and 2WindowsPageUp is:

tell application "Skim"
        tell document 1
                set p1 to index of current page
                if p1 > 1 then
                        go to page (p1 - 1)
                end if
        end tell
        if (count of documents) >= 2 then
                tell document 2
                        set p2 to index of current page
                        if p2 > 1 then
                                go to page (p2 - 1)
                        end if
                end tell
        end if
end tell

I've defined right and left arrows as Skim-specific keyboard shortcuts, and with the modifications above I can use them also with just 1 file being displayed...

Skim's scriptability really makes it a nice app.

--Ted


Thx again
        --Marc


On 17.08.2007, at 18:17, Christiaan Hofman wrote (with possible deletions):

You could use this script to go to the next page in sync, and a similar script to go to the previous page. You could save it in Library/Scripts/Applications/Skim/ and you can define shortcuts for them in the system prefs.

tell application "Skim"
        if (count of documents) < 2 then
                beep
                return
        end if
        tell document 1
                set p1 to index of current page
                set n1 to count of pages
        end tell
        tell document 2
                set p2 to index of current page
                set n2 to count of pages
        end tell
        if p1 < n1 and p2 < n2 then
                tell document 1 to go to page (p1 + 1)
                tell document 2 to go to page (p2 + 1)
        else
                beep
        end if
end tell


Christiaan



------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/


------------------------------------------------------------------------

_______________________________________________
Skim-app-users mailing list
Skim-app-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-users

--
Ted Pavlic <[EMAIL PROTECTED]>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Skim-app-users mailing list
Skim-app-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-users

Reply via email to