Howdy,
The following Applescript works fine in Skim 1.2.7 but gets an
"AppleScript Event Handler" error in 1.3.1. Is there something I can
do besides downgrade?
Thanks for such an awesome program.
Johnnie Wilcox
============ BEGIN AppleScript =============
set startPage to ""
repeat while startPage is ""
display dialog "Begin Numbering on Page:" default answer "all"
set startPage to text returned of result
end repeat
if startPage is not equal to "all" then
set endPage to ""
repeat while endPage is ""
display dialog "End Numbering on Page:" default answer "last"
set endPage to text returned of result
end repeat
end if
set pageNumber to ""
repeat while pageNumber is ""
display dialog "Starting page number:" default answer 1
set pageNumber to text returned of result
end repeat
set pageIncrement to ""
repeat while pageIncrement is ""
display dialog "Increment Pages by:" default answer 2
set pageIncrement to text returned of result
end repeat
try
tell application "Skim"
set numPages to number of pages of front document
end tell
if startPage is equal to "all" then
set startPage to 1
set endPage to numPages + 1
else
if endPage is equal to "last" then
set endPage to numPages + 1
else
set endPage to endPage + 1 as number
end if
end if
set thisPage to startPage as number
tell application "Skim"
repeat until thisPage is equal to endPage
tell page thisPage of front document
make note with properties {type:text note,
text:"--Page " &
pageNumber & "--", bounds:{100, 15, 170, 0}, line width:2, line
style:solid line, color:{61680, 52942, 50115, 65535}}
-- make note with
properties {type:text note, text:"--Page " &
pageNumber & "--", bounds:{left, top, right, bottom}, line width:2,
line style:solid line, color:{61680, 52942, 50115, 65535}}
-- make note with
properties {type:text note, text:"--Page " &
pageNumber & "--", bounds:{400, 165, 485, 150}, line width:2, line
style:solid line, color:{61680, 52942, 50115, 65535}}
end tell
set thisPage to thisPage + 1
set pageNumber to pageNumber + pageIncrement
end repeat
end tell
on error m
display dialog "Skim could not number the pages of the front
document: " & m
end try
============ END AppleScript =============
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Skim-app-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-users