Copy link to clipboard
Copied
Hello Guys, how to skip 2nd and 3rd steps in batch sequence which is "Run commands on" and "Select output location" respectively. Since i added the details of 2nd and 3rd sequences in my script itself. Also one more question, is there any method to run the JavaScript alone without batch sequences? if so how to do that?
Copy link to clipboard
Copied
1. Copy-paste the script into a new batch sequence and use it alone.
or
2. Copy-paste the script into the JavaScript Console, select all, hit the Enter key (not Return).
Copy link to clipboard
Copied
I cant understand clearly what you said. If i create new batch sequence by default remaining two options are there.
Copy link to clipboard
Copied
You can't remove these parts of the Action. They are an integral part of it.
You can set the "Select Output Location" setting to now save the files, if you're doing it in your script, though.
I don't understand how you could replace the command that selects which files to process with a script.
Did you hard-code the file-paths into the code? If so, then you don't need to use an Action at all.
Copy link to clipboard
Copied
I mentioned for current(this) document in the code. I asked in question itself is there any way to run the code alone without batch sequences?
Copy link to clipboard
Copied
madhusudhananc a écrit
I asked in question itself is there any way to run the code alone without batch sequences?
Copy-paste the script into the JavaScript Console, select all, hit the Enter key (not Return).
Copy link to clipboard
Copied
So you're only using it to process the current file? In that case you don't need to use an Action. Use the JS Console (as was mentioned above) or a folder-level script that adds a menu/toolbar item to the application that executes your code when clicked.
Copy link to clipboard
Copied
This is what i am required Try. Could you please assist me to do folder level script to add in toolbar. Give me any reference to do that.
Copy link to clipboard
Copied
A bit old but still relevant: https://acrobatusers.com/tutorials/folder_level_scripts
Copy link to clipboard
Copied
Hello Try. I read the article and i can understand the concept. But i cant proceed further. Do you have any example code for adding tool bar icon. Also guide me where i have to add my existing code along with the new codes?
Copy link to clipboard
Copied
Where to place the file is explained in the tutorial.
To add a new toolbar item (which doesn't actually do that anymore, but adds a button to the Add-On Tools panel under Tools), use the addToolButton method of the Document object. For details and examples see the Acrobat JS API Reference file.
Copy link to clipboard
Copied
When i try to get path for user its throwing back error below. How to solve this? or i can run from app folder itself?
GeneralError: Operation failed.
App.getPath:1:Console undefined:Exec
2
undefined
Copy link to clipboard
Copied
Use the "app" folder instead of the "user" folder.
Copy link to clipboard
Copied
Sorry, I have not created a new batch sequence in Acrobat 9 for years so I forgot about these steps.
Copy link to clipboard
Copied
You can use this free tool to find the JavaScripts folders: https://www.abracadabrapdf.net/?p=978