The problem with the code is- whenever I delete a previous stamp, the one that comes after, does not see this deletion and counts like no stamps have been deleted. Just to make sure that I have explained the problem correctly, let me give an example here; assume I have stamped three times in a row: stamp #1, Stamp #2, Stamp #3. And at the end, when I delete the Stamp #3, continuation of the stamping process would leave me with something like this: Stamp #1, Stamp #2, Stamp #4! Something that I do not want at all.
I know I should be able to save the incremented values somewhere to make the acrobat able to read it before trying to determine the stamp number, but I do know how.
Copy link to clipboard
What should happen when you delete stamp #2 ?
Thank you very much for your quick and helful response;
The question that you have asked, made me think more about the task the I expect this stamp to perform for me. I am kind of feeling some sort of logical issues with the thing that I want; I mean, what should really happen if someone delete a stamp from the completely sored stamp list. I think it should be possible for someone to develop a code that makes the number of stamps thoroughly sorted from the first stamp to the last one after deletion of a particular stamp, but I do not want to go that far (I think the code would be complecated in that case).
At the moment, you question has led to another question in my mind; would you please give me some hint to modify the code so that the new stamp deletes automatically the last stamp of the same kind so that, there would be just one stamp of that type in the entire document?
Stamp scripts are very limited. A stamp script cannot get info on or affect any other stamps. So, a stamp script cannot delete another stamp.
Now about your first question. What is the script used for the increment? The increment value has to be stored somewhere and then the stamp script increments the value. To decrement the count when a stamp is deleted would require a script that triggers when the stamp is deleted. There is no such script trigger.
This is the code I am using. I have found it online. today, I searched again to find the name of the website from which I have got it, but I failed to find it. At this moment, I am not even sure if there is any copyright behind publishing it.
Here is the code:
Please let me know what you think and if you see any problem with this code.
It's an interesting idea, and I believe it's doable, but it will require the development of a custom-made script, which I could create for you, for a fee. You can contact me privately via [try6767 at gmail.com] to discuss it further.
Thanks for your offer.