Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
General / Re: function parameters
« Last post by RTT on February 01, 2024, 03:03:34 AM »
You have to escape the backslash characters in a JavaScript string.
var PDFShellToolsExePath = "C:\\Program Files (x86)\\PDF-ShellTools\\PDFShellTools.exe";

Take note that you can use the scripts API from an external script directly. No need to call an internal script from an external one. You just need to register the pdfe root object (check the attached screenshot), and then initiate it as usually with any other ActiveX object.
var pdfe = new ActiveXObject("MyScripts.PDFEObject");

42
General / Re: function parameters
« Last post by Nick Riviera on January 31, 2024, 11:01:04 AM »
Thanks. cool. parameters works...
I would  ask, how I can run a custom script rename files with a shortcut
I tried with this script but it doesn't work for me

CallShellTools.js shortcut: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PDF-ShellTools
Target:  C:\Temp\CallShellTools.js Script  RunScript "ScriptName=test"

Code: [Select]
var PDFShellToolsExePath = "C:\Program Files (x86)\PDF-ShellTools\PDFShellTools.exe";

var ShellApp = new ActiveXObject("Shell.Application");
var SelectedFiles = [];
var Windows = ShellApp.Windows();
for (var i = 0; i < Windows.count; i++) {
    var Window = Windows(i);
    if (Window.FullName.toLowerCase().indexOf("iexplore.exe") == -1) {
        var SelectedItems = Window.Document.SelectedItems();
        for (var n = 0; n < SelectedItems.count; n++) {
            var SelectedItem = SelectedItems.Item(n);
            SelectedFiles.push(SelectedItem.Path);
        }
    }
}
if (SelectedFiles.length > 0) {
    var SelectedFilesList = SelectedFiles.join(';')
    var ArgumentsList = '';
    for (i = 1; i < WScript.Arguments.length; i++) {
        ArgumentsList += '"' + WScript.Arguments(i) + '" ';
    }
    ShellApp.ShellExecute(PDFShellToolsExePath, WScript.Arguments(0) + ' ' + ArgumentsList + ' "' + SelectedFilesList + '"', '', '', 0);
} else {
    var sapi = new ActiveXObject("sapi.spvoice");
    sapi.Speak("No files selected");
}
43
General / Re: function parameters
« Last post by RTT on January 28, 2024, 03:38:29 AM »
You can pass one parameter to the script using this notation:

[ScriptName](parameter)

and access it from the script, as a string type, with CurrentField.value

Using your example, the expression needs to be:
[f]_[test](value)

And the script:
Code: [Select]
function test() {
    var dt = new Date();
    var dx = dt.getDate() + CurrentField.value;
    return dx
}

The parameter can be the result of another expression:
[ScriptName](1,5,3,[script2])

Because in this case it contains a separator, you can emulate passing multiple parameters:
var parameters=CurrentField.value.split(',');
44
General / function parameters
« Last post by Nick Riviera on January 26, 2024, 09:55:43 AM »
Hello!

With the rename tool , can I use parameters in a javascript function?


Code: [Select]
function test(x) {
    var dt = new Date();
    var dx = dt.getDate() + x;
    return dx
}
45
Ideas/Suggestions / Re: Video Tutorial
« Last post by RTT on January 08, 2024, 03:50:08 PM »
Yes, video tutorials would be nice to have but I'm not good at it. But I offer free licenses, if someone want to make some.
You have the user's guide and can always ask, here in the forum or by email, if something you want to do can be done and how.
Regarding the release of new versions. I will eventually release new versions (many new things already implemented) but I need to find time to fix some issues, regarding some core changes (database related) that I want to introduce in the next release.
46
Ideas/Suggestions / Video Tutorial
« Last post by dohnjoe on January 07, 2024, 12:27:05 PM »
Hi
I have been always fascinated by editing and organizing PDF files.
PDF Explorer is very special in this regard because it has database features, lots of tools, batch operations, etc.
Yet for some reason, I have a hard time using all its features.
That is why I would be very grateful if you recorded a video tutorial which shows all its intricate features.
Thank you in advance.

PS
Any chance of releasing a new version?
47
Bug reports / Re: Failure of Batch Stamp Command
« Last post by mc2023 on June 08, 2023, 02:41:33 AM »
Thanks for your prompt reply.  Now I know the issue.  The counter variable works fine to me.  Waiting for the next release! 
48
Bug reports / Re: Failure of Batch Stamp Command
« Last post by RTT on June 07, 2023, 03:41:47 PM »
There is a known bug with the "give stamped files a new name" functionality. If the new name expression makes reference to the file name, or any metadata field, it will always use the data from the first file, from the batch being stamped, resulting in all the new names being equal.
As workaround you may add a counter to the new name expression, to make it variable.

It's already fixed here and will be included in the next release.
If you want to test the beta 3.4.1, contact me from your license registered email address.
49
Bug reports / Failure of Batch Stamp Command
« Last post by mc2023 on June 07, 2023, 09:49:35 AM »
I am using the paid version of PDF-shell Tools (Ver. 3.4.0.0) on Window 10 Pro.  Batch Stamp does not work properly. 
Here is what I did:
1) Select both A.pdf and B. pdf files by using Shift-Left Click in File Explorer (First click on A.pdf and then click on B.pdf).
2) Right click the highlighted files to go to Stamp Command via pop menu.
3) Open Stamp template file on Stamp Command window.
4) Right click the selected pdf files to stamp only the first page.
5) File Save Mode is set to Backup Original File and check to give stamped file a new name.
6) Recall the Rename Formula file in Quick Setting under Expression Composer Window.
7) Then press Stamp.

It turns out that 1 stamped file (B-stamp.pdf) is created but no stamped file for A.pdf.  Then I did the same procedure above for A.pdf.  It happened that A-stamp.pdf was created but the content was the same as B-stamp.pdf (As if just renaming first created B-stamp.pdf to A-stamp. pdf).  I got the same result even I changed the name of pdf files.  Batch Stamp Command seems work on the last-clicked pdf file.

Any advice is appreciated.  Thanks.
50
General / Re: How to get a discription in the subject field of a att
« Last post by RTT on May 28, 2023, 04:06:06 PM »
Maybe a idea for a future release to add a kind of double click action to edit these fields in this dialog.
Currently the double-click opens the clicked attachment in the external assigned application.
The F2 key is Windows standard to enter field edit mode, but you are right that it should be mentioned in the user's guide, especially the need to click previously the column to edit, in order to select the filename or description fields.
Maybe a "edit" item, in the field right click menu, is also a good idea.

Quote
Last question, is it also possible to add this "description" using the commandline interface ?
No, but shouldn't be too difficult to add to the Attach command. Now in the todo list.
Pages: 1 ... 3 4 [5] 6 7 ... 10