<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Request New Plugin]]></title><description><![CDATA[<p dir="auto">Can some one provide a plugin like calculator…<br />
for example …<br />
1+2+3=6<br />
pressing Enter key and give me the answer…</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/20336/request-new-plugin</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 01:32:47 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/20336.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Nov 2020 05:18:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Request New Plugin on Fri, 20 Nov 2020 09:10:33 GMT]]></title><description><![CDATA[<p dir="auto">Simplified version.<br />
Place this text in the ‘Notepad ++ \ plugins \ jN \ jN \ includes’ directory and this functionality will work for you on the selected text by pressing the ‘Ctrl + Shift + C’ hotkey.</p>
<pre><code>// trdm 2020-11-20 11:44:27  
// вычисляет выделение в N++ как выражение с пом WSH javascript 'eval'
// file: C:\_ProgramF\Notepad++\plugins\jN\jN\includes\trdmUtil.js
// repo: https://github.com/trdm/jn-npp-scripts
function evalSelection() {
	var selTextOrig = Editor.currentView.selection;
	if(selTextOrig.length == 0) {
		return;
    }
	var vRezult = 0;
	try { 
		vRezult = eval(selTextOrig);
    } catch(e) {
		vRezult = '';
    }
	if(!vRezult) {
		return;
    } else if(vRezult == NaN) {
		return;
    }
	Editor.currentView.selection = selTextOrig + " = "+vRezult;
} 

var myEvalSelectionItem = {
    text: "Eval selection \tCtrl+Shift+C", 
    ctrl: true,
    shift: true,
    alt: false,
    key: 0x43, 
    cmd: evalSelection
};


if (!jN.scriptsMenu){
	var scriptsMenu = Editor.addMenu("jN.scripts");
	jN.scriptsMenu = scriptsMenu;
}
scriptsMenu = jN.scriptsMenu;


addHotKey(myEvalSelectionItem); 
scriptsMenu.addItem(myEvalSelectionItem);

</code></pre>
<p dir="auto">Demonstration:<br />
<img src="https://raw.githubusercontent.com/trdm/jn-npp-scripts/master/Doc/trdmUtil.js-evalSelection.gif" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/59936</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/59936</guid><dc:creator><![CDATA[TroshinDV]]></dc:creator><pubDate>Fri, 20 Nov 2020 09:10:33 GMT</pubDate></item><item><title><![CDATA[Reply to Request New Plugin on Fri, 20 Nov 2020 08:41:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/troshindv" aria-label="Profile: TroshinDV">@<bdi>TroshinDV</bdi></a></p>
<ul>
<li>The code only works for the selected piece of text.</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/59934</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/59934</guid><dc:creator><![CDATA[TroshinDV]]></dc:creator><pubDate>Fri, 20 Nov 2020 08:41:29 GMT</pubDate></item><item><title><![CDATA[Reply to Request New Plugin on Fri, 20 Nov 2020 08:35:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/asif-mute" aria-label="Profile: Asif-Mute">@<bdi>Asif-Mute</bdi></a> said in <a href="/post/59844">Request New Plugin</a>:</p>
<blockquote>
<p dir="auto">Can some one provide a plugin like calculator…</p>
</blockquote>
<p dir="auto">I wrote a calculator in javascript for the time (The jN plugin is used.) (I am a Freelancer, I need to calculate the working time.) Adds and subtracts formulas like:<br />
“15, 2.20, 20, 25”<br />
“20.30 - 1.30”<br />
where the comma is converted to “+”<br />
The code is below. Use as a template.</p>
<pre><code>/* —Складывает минуты в форме: 
15, 2.20, 20, 25 = 3.20 где 3,20 - 3 часа, 20 минут
35, 50, 40, 55, 45, 40
*/


function stringToMinuts(psStr) {
	var parseRes = 0;
	tmS = psStr.split(".");
	if (tmS.length == 1) {
		parseRes = parseInt(tmS[0]);
		if(parseRes &lt; 5) {
			parseRes *= 60;
		}
	} else {
		parseRes = parseInt(tmS[0])*60 + parseInt(tmS[1]);
	}
	if(parseRes == isNaN) {
		parseRes = 0;
    }
	
	return parseRes;
}

function minutesToHH_MM(psMin) {
	var vRetVal = 0;
	var resultH = (psMin / 60);
	vRetVal = (""+resultH).split(".")[0];
	resultH = (psMin % 60);
	if(resultH&lt;10) {
		resultH = '0'+resultH;
    } else {
		resultH = resultH + "000";
		resultH = resultH.substring(0,2);
    }
	vRetVal = vRetVal + "."+resultH;
	
	return vRetVal;
}

function rep(psParam) {
	var vRetVal = stringToMinuts(psParam);
	return vRetVal;
}

//(c)trdmval@gmail.com 2017-12-28 11:23:09
function timeAddition()
{
	//debugger;	vText = "Time addition(2.45+20 = 3.05)\tCtrl+Shift+D";	//2.45+20,3.05 = 6.10 
	var selTextOrig,selText = "15, 2.20, 20, 25";// Editor.currentView.selection;
	if(IntellPlus.debugMode()) {
		debugger;
    }
	selTextOrig = Editor.currentView.selection;
	selText = selTextOrig;
	selText = selText.replace("+",",");
	while(selText.indexOf("+")!= -1) {
		selText = selText.replace("+",",");
    	// break; continue;
    }
	var arr = new Array;
	var result = 0;

	// https://regex101.com/
	// 1.10, 35, 5, 1.30
	// 20.30 - 1.30
	var vRe0 =	/(\s*|,|\+|\-)([0-9\.]+)(\s*|,|\+|\-)/g; //
//	var vRe1 =	/\s*([0-9\.]+)\s*\-\s*([0-9\.]+)\s*/; //.exec(selText)	{...}	Object
	
	var selText2 = selText;

	var vRe0_rez = 	selText2;
	vRe0_rez = vRe0_rez.replace(/(,)/g,'+');
	vRe0_rez = 	vRe0_rez.replace(vRe0,rep);
	vRe0_rez = trimSimple(vRe0_rez);
	
	try { 
		result = eval(vRe0_rez);
    } catch(e) {
		message(e.message+' в: \''+ vRe0_rez+'\' (неправильное выражение для eval)');
		result = 0;
    }
	//message(vRe0_rez + ' = ' + result);
	if(result == 0) {		
		arr = selText.split(",");
		
		var tmS = "";
		var i = 0;
		var parseRes = 0;
		var itemN = 0;
		for (i = 0; i&lt;arr.length; i++ ) {
			itemN = arr[i];
			itemN = itemN.replace(/\s+/,'');
			if(itemN == "") {
				continue;
			}
			parseRes = stringToMinuts(arr[i]);
			
			result +=  0 + parseRes;
		}
    }
	if (result &lt;= 0 || result == NaN) {
		alert("Нужно выделить числа, типа: 15, 2.45, 20, 25")
		return '';
	}
		
	tmS = minutesToHH_MM(result);
	IntellPlus.init();

	// если выделение - это последний фрагмент в строке, то в принципе можно добавить к строке " = "+tmS
	var vCurLineTxt = IntellPlus.currentLineSrc;
	vCurLineTxt = trimRight(vCurLineTxt);
	var selTextOrig2 = trimRight(selTextOrig);
	if(strEndWithThis(vCurLineTxt, selTextOrig)) {
		Editor.currentView.selection = selTextOrig + " = "+tmS;
    }
	EditorMessage(selText+" = " + tmS);
	result = parseFloat(tmS);
}
jN.scriptsMenu = (!jN.scriptsMenu) ? {} : jN.scriptsMenu;
scriptsMenu = jN.scriptsMenu; // глобальная переменная с меню скриптами.

var myTimeAdditionItem = {
    text: "Time addition(2.45+20 = 3.05)\tCtrl+Shift+D", 
    ctrl: true,
    shift: true,
    alt: false,
    key: 0x44, // "I"
    cmd: timeAddition
};
scriptsMenu.addSeparator();
addHotKey(myTimeAdditionItem); scriptsMenu.addItem(myTimeAdditionItem);

function typeSymbol( psSymb ) {	Editor.currentView.selection = psSymb; }
function addHotSym(psFu, psKey) {
	var rv = {
		ctrl: false,
		shift: false,
		alt: true,
		key: psKey, // "I"
		cmd: psFu
	};
	addHotKey(rv);	// Различные клавиши &lt;&gt;
}

// Ввоод символов в русской раскладке схема Alt+' &gt;&gt; ' ; Alt+$ &gt;&gt; $. Можно не переключать раскладку.
function typeSymbol_1() {	typeSymbol( '&lt;' );} addHotSym(typeSymbol_1,0xBC);
function typeSymbol_3() {	typeSymbol( '\'' );} addHotSym(typeSymbol_3,0xDE);
function typeSymbol_2() {	typeSymbol( '&gt;' );} addHotSym(typeSymbol_2,0xBE);
function typeSymbol_4() {	typeSymbol( '~' );} addHotSym(typeSymbol_4,0xC0);
function typeSymbol_5() {	typeSymbol( '$' );} addHotSym(typeSymbol_5,0x34);//$
function typeSymbol_6() {	typeSymbol( '#' );} addHotSym(typeSymbol_6,0x33); //#########
function typeSymbol_7() {	typeSymbol( '|' );} addHotSym(typeSymbol_7,0xDC); //
function typeSymbol_8() {	typeSymbol( '[' );} addHotSym(typeSymbol_8,0xDB); //
function typeSymbol_9() {	typeSymbol( ']' );} addHotSym(typeSymbol_9,0xDD); //
function typeSymbol_10() {	typeSymbol( '\'' );} addHotSym(typeSymbol_10,0xDE); //

</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/59933</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/59933</guid><dc:creator><![CDATA[TroshinDV]]></dc:creator><pubDate>Fri, 20 Nov 2020 08:35:15 GMT</pubDate></item><item><title><![CDATA[Reply to Request New Plugin on Thu, 19 Nov 2020 14:05:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/asif-mute" aria-label="Profile: Asif-Mute">@<bdi>Asif-Mute</bdi></a> said in <a href="/post/59846">Request New Plugin</a>:</p>
<blockquote>
<p dir="auto">As Im waiting this feathure as  in pluging type or integrated into the next version…</p>
</blockquote>
<p dir="auto">You are under the mistaken impression that a post in this forum will magically assign someone to work on it, and that any request made will be immediately fulfilled in the next release.</p>
<p dir="auto">Plugins are contributed by anyone who wants to write a plugin; even if this forum were the official feature request system for Notepad++ (which <a href="https://community.notepad-plus-plus.org/topic/15741/faq-desk-feature-request-or-bug-report">this forum isn’t</a>), the Notepad++ core developers aren’t the ones who develop plugins for Notepad++.</p>
<p dir="auto">Besides, as <a class="plugin-mentions-user plugin-mentions-a" href="/user/daniel-fuchs" aria-label="Profile: Daniel-Fuchs">@<bdi>Daniel-Fuchs</bdi></a> said, there is already a plugin that will do that.  If you have PythonScript plugin installed, you can show the PythonScript console, type in <code>1+2+3</code> and it will print <code>6</code>.  You can easily copy/paste from or into the PythonScript console.</p>
<p dir="auto">So instead of waiting for something that’s not going to happen, why not just install the plugin that will already do what you described?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/59856</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/59856</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 19 Nov 2020 14:05:15 GMT</pubDate></item><item><title><![CDATA[Reply to Request New Plugin on Thu, 19 Nov 2020 05:43:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/daniel-fuchs" aria-label="Profile: Daniel-Fuchs">@<bdi>Daniel-Fuchs</bdi></a> said in <a href="/post/59845">Request New Plugin</a>:</p>
<blockquote>
<p dir="auto">PythonScript</p>
</blockquote>
<p dir="auto">As Im waiting this feathure as  in pluging type or integrated into the next version…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/59846</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/59846</guid><dc:creator><![CDATA[Asif Mute]]></dc:creator><pubDate>Thu, 19 Nov 2020 05:43:32 GMT</pubDate></item><item><title><![CDATA[Reply to Request New Plugin on Thu, 19 Nov 2020 05:29:50 GMT]]></title><description><![CDATA[<p dir="auto">You can use PythonScript for that. The console is loved by people for its strong mathematics features.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/59845</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/59845</guid><dc:creator><![CDATA[Daniel Fuchs]]></dc:creator><pubDate>Thu, 19 Nov 2020 05:29:50 GMT</pubDate></item></channel></rss>