By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Automatic .BTM Notes

I am printing off a very large PDF file, but only about 10 pages per day.

Instead of writing down the last pages that I printed, I have modified my .BTM to record the last pages that I printed at the end of the .BTM

@echo off
activate "My Large PDF Document*"
keystack Ctrl-P
delay 1
keystack Alt-G
delay 1
keystack Tab
delay 1
keystack "%1 - %@eval[%1+9]"
echo Last Printed %1 - %@eval[%1+9] %_ISODATE %_TIME >> %_batchname
Last Printed 71 - 80 2017-08-11 08:46:27

Thus, the last time I ran the .BTM, I started it with;
PrintIt.btm 71
which appended the line
Last Printed 71 - 80 2017-08-11 08:46:27
to the end of the .BTM file.

The next time I want to print off more of my PDF file, I simply do a
tail PrintIt.btm
to see where I left off.

This technique could also be used to track when a .BTM was last executed, along with command line arguments, environment variables, etc.

I did this sort of thing with a very large project I was doing, which worked on semaphore stops.

My trick here is to store the stuff in registry (eg HKCU\Software\Wendy\semaphore\pdfprint). You then load it from registry, do the calculations, and print the message, and then load the "71-80" into clipboard.

You would open the PDF print dialog, run the batch file, and it would put the number into the clipboard. control v puts it into the right spot.

You need to have a reset-option in the batch, eg "/r", which reverts the registry setting back to a different setting, eg /r 70 to over-write the value 70 to registry.