Discussion:
[Skim-app-users] Merging markup notes across multiple pages using Applescript
Samrat Roy
2016-05-02 19:01:15 UTC
Permalink
Hi there,

First let me say that Skim is an great PDF annotating tool. Kudos to
Christiaan for making this for us.

Unfortunately, I have an issue and was hoping someone may have a solution
for me. Currently, I have a PDF where certain highlights cross the page
bounds. I made use of the Applescript examples on the Wiki to write a
script to merge highlights ( also boxes ) across multiple pages, but I keep
on getting an error,

can get characters X thru Y from page Z on .....

when I attempt to create a new note using

make new note with properties (type:highlight note,
selection:noteSelection)

where the variable noteSelection was assigned the value
set noteSelection to join noteSelection to selection of vNote.

Could someone please tell me how I can achieve this ?
Also, is it possible to merge Highlights, Boxes together ?
Thank you for you help and time.

Regards,
Sam
Christiaan Hofman
2016-05-02 19:29:35 UTC
Permalink
Post by Samrat Roy
Hi there,
First let me say that Skim is an great PDF annotating tool. Kudos to Christiaan for making this for us.
Unfortunately, I have an issue and was hoping someone may have a solution for me. Currently, I have a PDF where certain highlights cross the page bounds. I made use of the Applescript examples on the Wiki to write a script to merge highlights ( also boxes ) across multiple pages, but I keep on getting an error,
can get characters X thru Y from page Z on .....
when I attempt to create a new note using
make new note with properties (type:highlight note, selection:noteSelection)
where the variable noteSelection was assigned the value
set noteSelection to join noteSelection to selection of vNote.
Could someone please tell me how I can achieve this ?
Also, is it possible to merge Highlights, Boxes together ?
Thank you for you help and time.
Regards,
Sam
This is really annoying. This should work, and it certainly did work in the past. Unfortunately Apple has broken it again. The problem is that AppleScript has a bug with range specifiers (which we use for selections), and they refuse to fix this for as long as I know, and in fact that make the bug more serious over time. We try to work around it, but apparently this workaround does not work for the “make” command. There is, unfortunately, no way we can fix this. And therefore no other way to do it. Best we can hope is that Apple fixes this, but I have little hope.

BTW, no, you can’t merge different note types, that would not even make sense.

Christiaan
Samrat Roy
2016-05-02 20:37:08 UTC
Permalink
Thank you Christiaan for the quick reply! Oh well, what can we do,
sometimes we get stuck with shitty code. Thanks again for your reply, and
hope Apple fixes this in the future. :)

Regards,
Sam.
Post by Samrat Roy
Hi there,
First let me say that Skim is an great PDF annotating tool. Kudos to
Christiaan for making this for us.
Unfortunately, I have an issue and was hoping someone may have a solution
for me. Currently, I have a PDF where certain highlights cross the page
bounds. I made use of the Applescript examples on the Wiki to write a
script to merge highlights ( also boxes ) across multiple pages, but I keep
on getting an error,
can get characters X thru Y from page Z on .....
when I attempt to create a new note using
make new note with properties (type:highlight note,
selection:noteSelection)
where the variable noteSelection was assigned the value
set noteSelection to join noteSelection to selection of vNote.
Could someone please tell me how I can achieve this ?
Also, is it possible to merge Highlights, Boxes together ?
Thank you for you help and time.
Regards,
Sam
This is really annoying. This should work, and it certainly did work in
the past. Unfortunately Apple has broken it again. The problem is that
AppleScript has a bug with range specifiers (which we use for selections),
and they refuse to fix this for as long as I know, and in fact that make
the bug more serious over time. We try to work around it, but apparently
this workaround does not work for the “make” command. There is,
unfortunately, no way we can fix this. And therefore no other way to do it.
Best we can hope is that Apple fixes this, but I have little hope.
BTW, no, you can’t merge different note types, that would not even make sense.
Christiaan
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications
Manager
Applications Manager provides deep performance insights into multiple
tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Skim-app-users mailing list
https://lists.sourceforge.net/lists/listinfo/skim-app-users
Christiaan Hofman
2016-05-09 22:08:43 UTC
Permalink
Well, great. Apple thinks this change is actually not a bug, but an improvement! Go figure. Of course I strongly disagree, but I disagree with so much in AppleScript.

Christiaan
Thank you Christiaan for the quick reply! Oh well, what can we do, sometimes we get stuck with shitty code. Thanks again for your reply, and hope Apple fixes this in the future. :)
Regards,
Sam.
Post by Samrat Roy
Hi there,
First let me say that Skim is an great PDF annotating tool. Kudos to Christiaan for making this for us.
Unfortunately, I have an issue and was hoping someone may have a solution for me. Currently, I have a PDF where certain highlights cross the page bounds. I made use of the Applescript examples on the Wiki to write a script to merge highlights ( also boxes ) across multiple pages, but I keep on getting an error,
can get characters X thru Y from page Z on .....
when I attempt to create a new note using
make new note with properties (type:highlight note, selection:noteSelection)
where the variable noteSelection was assigned the value
set noteSelection to join noteSelection to selection of vNote.
Could someone please tell me how I can achieve this ?
Also, is it possible to merge Highlights, Boxes together ?
Thank you for you help and time.
Regards,
Sam
This is really annoying. This should work, and it certainly did work in the past. Unfortunately Apple has broken it again. The problem is that AppleScript has a bug with range specifiers (which we use for selections), and they refuse to fix this for as long as I know, and in fact that make the bug more serious over time. We try to work around it, but apparently this workaround does not work for the “make” command. There is, unfortunately, no way we can fix this. And therefore no other way to do it. Best we can hope is that Apple fixes this, but I have little hope.
BTW, no, you can’t merge different note types, that would not even make sense.
Christiaan
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z <https://ad.doubleclick.net/ddm/clk/302982198;130105516;z>_______________________________________________
Skim-app-users mailing list
https://lists.sourceforge.net/lists/listinfo/skim-app-users <https://lists.sourceforge.net/lists/listinfo/skim-app-users>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________
Skim-app-users mailing list
https://lists.sourceforge.net/lists/listinfo/skim-app-users
Christiaan
Christiaan Hofman
2016-05-10 10:07:53 UTC
Permalink
I found a workaround for the problem introduced by Apple. In the next version of Skim you can pass the selection in the “with data” argument of the “make” command, rather than the properties record, as in:

make new note with properties {type:highlight note} with data noteSelection

That seems to work, Apple only seems to do the excessive evaluation in the properties record.

Christiaan
Post by Christiaan Hofman
Well, great. Apple thinks this change is actually not a bug, but an improvement! Go figure. Of course I strongly disagree, but I disagree with so much in AppleScript.
Christiaan
Thank you Christiaan for the quick reply! Oh well, what can we do, sometimes we get stuck with shitty code. Thanks again for your reply, and hope Apple fixes this in the future. :)
Regards,
Sam.
Post by Samrat Roy
Hi there,
First let me say that Skim is an great PDF annotating tool. Kudos to Christiaan for making this for us.
Unfortunately, I have an issue and was hoping someone may have a solution for me. Currently, I have a PDF where certain highlights cross the page bounds. I made use of the Applescript examples on the Wiki to write a script to merge highlights ( also boxes ) across multiple pages, but I keep on getting an error,
can get characters X thru Y from page Z on .....
when I attempt to create a new note using
make new note with properties (type:highlight note, selection:noteSelection)
where the variable noteSelection was assigned the value
set noteSelection to join noteSelection to selection of vNote.
Could someone please tell me how I can achieve this ?
Also, is it possible to merge Highlights, Boxes together ?
Thank you for you help and time.
Regards,
Sam
This is really annoying. This should work, and it certainly did work in the past. Unfortunately Apple has broken it again. The problem is that AppleScript has a bug with range specifiers (which we use for selections), and they refuse to fix this for as long as I know, and in fact that make the bug more serious over time. We try to work around it, but apparently this workaround does not work for the “make” command. There is, unfortunately, no way we can fix this. And therefore no other way to do it. Best we can hope is that Apple fixes this, but I have little hope.
BTW, no, you can’t merge different note types, that would not even make sense.
Christiaan
Loading...