MoMann:
--------------------------------------------------------------------------------
Can you create a button that will generate the Epoch Time
--------------------------------------------------------------------------------
If you mean the current time since the Epoch, you can do this easily with a
script; the following code inserts the timestamps in seconds at the current
cursor position (or it replaces the selection).
Without the rounding etc. you can get milisecons since epoc available from the
javascript getTime()
Of course both depend on the system clock setting of the given computer...
vbr
///////... PSPad\Script\JScript\timestamp.js ///////////////
cite:
--------------------------------------------------------------------------------
var module_name = "timestamp";
var module_ver = "0.1";
function get_timestamp(){
if (editorsCount()<1){return;}
var actEd = newEditor();
actEd.assignActiveEditor();
timestamp_sec_since_Epoch = Math.round(new Date().getTime() / 1000);
actEd.selText(timestamp_sec_since_Epoch);
}
function Init(){
addMenuItem("get timestamp", "", "get_timestamp", "Ctrl+Alt+S");// labels and
shortcuts can be modified
}
--------------------------------------------------------------------------------
--
<http://forum.pspad.com/read.php?2,55028,55030>
PSPad freeware editor http://www.pspad.com