So if it breaks and you have to re-start it, the number you start it from will always be either 0 or a multiple of 5. Pages are saved starting from 0 (page 0 is called "a" in the app, fuck knows why) and up in increments of 5, so you'll end up with 0.pdf, 5.pdf,10.pdf, etc etc. If this happens just set the startPage to the Next page you don't have. If your computer is really fast then you can probably lower it a bit, but if the saving of any one pdf takes more than the delay then the script will break and you'll have to manually stop it. The delay of 7 seconds is quite conservative, this should do nicely for most people.Change the totalPages to the number of pages, and authorName to whatever you want that field set to in the pdf.Tell application "System Events" to keystroke authorNameĮnd tellDid you notice how we even took away the sides of our sexy ASCII art just so you would have hassle-free copy+paste? Tell application "System Events" to keystroke theIncrementValue as string Tell application "System Events" to keystroke return Tell application "System Events" to keystroke theIncrementValue + 5 as string Tell application "System Events" to keystroke tab Tell application "System Events" to keystroke thisValue as string Tell application "System Events" to keystroke "p" using command down Repeat with theIncrementValue from startPage to totalPages - 1 by 5
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |