PDF Explorer > General

Tips on "Custom Scripts" JS syntax

<< < (2/2)

RTT:

--- Quote from: Padanges on September 15, 2016, 08:09:45 PM ---How can we get the current date and time in Custom scripts? It should be something like this (but it isn't): Date.now() ?

I'm posting this question in this thread, as it's the same JS syntax stuff. Regards.

--- End quote ---
You are coding JScript, so you just need to check the JScript language reference.
JScript Language Reference (Windows Scripting - JScript)
Date Object (Windows Scripting - JScript)

var now= new Date();
pdfe.echo(now);

Padanges:
It seems ( https://msdn.microsoft.com/en-us/library/b272f386(v=vs.84).aspx ) that we don't have variance(), stddev() statistical function methods, even though they can be used in Eval expressions syntax. Is there a way to access them using custom scripts after all?

RTT:
No, these grid layout dynamic columns eval expressions functions are not accessible from the active scripting scripts.
There are plenty of implementations in JavaScript you can use. Just Google it. Here is one example: https://gist.github.com/Daniel-Hug/7273430

Padanges:

--- Quote ---There are plenty of implementations in JavaScript you can use. Just Google it. Here is one example: https://gist.github.com/Daniel-Hug/7273430
--- End quote ---
Thanks for the clarification. It's good to know.

Navigation

[0] Message Index

[*] Previous page

Reply

Go to full version