<?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[Little Dialog-wrapper for PythonScript]]></title><description><![CDATA[<p dir="auto">Since I needed a more advanced dialog, I wrote a little wrapper that can be found <a href="https://github.com/Ekopalypse/NppPythonScripts/tree/master/helper/WinDialog" rel="nofollow ugc">here</a>.<br />
Note that this is not a full-blown dialog that provides everything you want or need, but rather a framework to get you started.<br />
I have no plans to extend it at this time.<br />
Other limitations: PythonScript version 3.0.16 is required!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24389/little-dialog-wrapper-for-pythonscript</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 19:18:10 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24389.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 20 Apr 2023 12:01:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Fri, 20 Sep 2024 18:27:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/31718">@Bruno-Bonaspetti</a> ,</p>
<p dir="auto">Have a little patience.  You already asked that question yesterday <a href="https://community.notepad-plus-plus.org/post/96687">here</a>.  This is not paid support that is guaranteed to get a reply in 5 minutes or your money back; this is a Community of fellow users of Notepad++, and as such, any who read here regularly and answer questions do so solely on their free time, and they might not always have time to answer a specific question – especially one that might take more knowledge of a specific sub-tool of Notepad++.</p>
<p dir="auto">Furthermore, this topic, “Little Dialog-wrapper for PythonScript” is focused on the Dialog Wrapper library for the PythonScript plugin; it briefly mentioned a script that was using that wrapper to help with the user interface, but the translation is <em>not</em> the focus of this discussion.</p>
<p dir="auto">Your original question was in the right place.  This question was <em>not</em>.  I will try to give a brief answer in the other topic.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/96699</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/96699</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 20 Sep 2024 18:27:17 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Fri, 20 Sep 2024 18:15:29 GMT]]></title><description><![CDATA[<p dir="auto">Hello, could someone show me how to download and install this translation plugin on notepad++, as I have a lot of things to translate and word translation doesn’t work as it should.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/96698</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/96698</guid><dc:creator><![CDATA[Bruno Bonaspetti]]></dc:creator><pubDate>Fri, 20 Sep 2024 18:15:29 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Thu, 18 Apr 2024 00:07:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a> said in <a href="/post/93909">Little Dialog-wrapper for PythonScript</a>:</p>
<blockquote>
<p dir="auto">Is there some magic that needs to go in the <a href="http://startup.py" rel="nofollow ugc">startup.py</a> to make PS3 see the user-lib directory for a portable installation?</p>
</blockquote>
<p dir="auto">This is now fixed in the <a href="https://github.com/bruderstein/PythonScript/releases/tag/v3.0.18" rel="nofollow ugc">3.0.18 release</a>.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94372</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94372</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Thu, 18 Apr 2024 00:07:02 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Thu, 18 Apr 2024 00:06:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14847">@Michael-Vincent</a> said in <a href="/post/94165">Little Dialog-wrapper for PythonScript</a>:</p>
<blockquote>
<p dir="auto">And my specific fix:</p>
</blockquote>
<p dir="auto">Not needed anymore - <a href="https://github.com/bruderstein/PythonScript/releases/tag/v3.0.18" rel="nofollow ugc">3.0.18 is released</a> which fixes this bug.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94371</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94371</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Thu, 18 Apr 2024 00:06:06 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Tue, 09 Apr 2024 19:42:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14847">@Michael-Vincent</a> said in <a href="/post/94033">Little Dialog-wrapper for PythonScript</a>:</p>
<blockquote>
<p dir="auto">Afraid it’s not that easy for me.</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24257">@mpheath</a> points out it is indeed “that easy” if you know what you are doing and thank you <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24257">@mpheath</a> for showing me what to do:<br />
<a href="https://github.com/bruderstein/PythonScript/issues/322#issuecomment-2041020162" rel="nofollow ugc">https://github.com/bruderstein/PythonScript/issues/322#issuecomment-2041020162</a></p>
<p dir="auto">And my specific fix:<br />
<a href="https://github.com/bruderstein/PythonScript/issues/322#issuecomment-2045932479" rel="nofollow ugc">https://github.com/bruderstein/PythonScript/issues/322#issuecomment-2045932479</a></p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94165</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94165</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Tue, 09 Apr 2024 19:42:02 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Thu, 04 Apr 2024 21:18:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24257">@mpheath</a> said in <a href="/post/93918">Little Dialog-wrapper for PythonScript</a>:</p>
<blockquote>
<p dir="auto">It is a workaround until a fixed version is released.</p>
</blockquote>
<p dir="auto">Afraid it’s not that easy for me.  I’ve added all my missing directories to make it “on par” with the previous version, but I still get a <code>ImportError</code> that I do not get in the previous version:</p>
<pre><code>ImportError: DLL load failed while importing win32gui: The specified module could not be found.
</code></pre>
<p dir="auto">Rest assured, the module is installed correctly.  I can import it from my system Python and from PythonScript 3.0.17 commit right before the commit that breaks the path that I note in my <a href="https://github.com/bruderstein/PythonScript/issues/322" rel="nofollow ugc">issue</a>.  I’ve tried adding the specific directories to both <code>sys.path</code> and <code>os.environ["PATH"]</code> as described in <a href="https://github.com/mhammond/pywin32/issues/1730" rel="nofollow ugc">https://github.com/mhammond/pywin32/issues/1730</a> and other Google results.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94033</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94033</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Thu, 04 Apr 2024 21:18:37 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Sat, 30 Mar 2024 01:09:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14847">@Michael-Vincent</a> You can add paths to <code>sys.path</code> if want to use PythonScript version <code>3.0.17.0</code>.</p>
<p dir="auto">This is what I have been using in <code>startup.py</code> .</p>
<pre><code># Fix for sys.path bug in 3.0.17
if notepad.getPluginVersion() in ('3.0.17.0',):
    sys.path.append(notepad.getPluginConfigDir() + r'\PythonScript\lib')
</code></pre>
<p dir="auto">It is a workaround until a fixed version is released.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/93918</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93918</guid><dc:creator><![CDATA[mpheath]]></dc:creator><pubDate>Sat, 30 Mar 2024 01:09:14 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Fri, 29 Mar 2024 18:51:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14847">@Michael-Vincent</a> said in <a href="/post/93911">Little Dialog-wrapper for PythonScript</a>:</p>
<blockquote>
<p dir="auto">I have stayed on 3.0.16 because of this and until this gets fixed.</p>
</blockquote>
<p dir="auto">Okay, switching to 8.6.4 portable with 3.0.16, I can get it to work using the user-lib instead of machine-lib.  Thanks.</p>
<p dir="auto"><em>update: moved remainder of this post to the <a href="https://community.notepad-plus-plus.org/post/93913">other Topic</a>, since it’s <code>translate.py</code> specific, and this Dialog-wrapper Topic is already pretty full…</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/93912</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93912</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 29 Mar 2024 18:51:02 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Fri, 29 Mar 2024 17:58:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a> said in <a href="/post/93909">Little Dialog-wrapper for PythonScript</a>:</p>
<blockquote>
<p dir="auto">PythonScript 3.0.17</p>
</blockquote>
<p dir="auto">That’s “most likely” the problem.  See here:</p>
<p dir="auto"><a href="https://github.com/bruderstein/PythonScript/issues/322" rel="nofollow ugc">https://github.com/bruderstein/PythonScript/issues/322</a></p>
<p dir="auto">I have stayed on 3.0.16 because of this and until this gets fixed.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/93911</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93911</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Fri, 29 Mar 2024 17:58:12 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Fri, 29 Mar 2024 17:40:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a> ,</p>
<p dir="auto">After reading <a href="https://community.notepad-plus-plus.org/post/93907">this post</a>, I wanted to try out <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14847">@Michael-Vincent</a>’s translation script.</p>
<p dir="auto">So I went to my portable that has PythonScript 3.0.17 installed, and tried to install based on the <a href="https://github.com/Ekopalypse/NppPythonScripts/tree/master/helper/WinDialog" rel="nofollow ugc">README instructions</a> and tried to run the first example there.  I get</p>
<pre><code>Python 3.12.1 (tags/v3.12.1:2305ca5, Dec  7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)]
Initialisation took 406ms
Ready.
Traceback (most recent call last):
  File "C:\usr\local\apps\npp\npp862.ps3\plugins\Config\PythonScript\scripts\windlg_ex1.py", line 1, in &lt;module&gt;
    from WinDialog import Dialog, Button, create_dialog_from_rc
ModuleNotFoundError: No module named 'WinDialog'
</code></pre>
<p dir="auto">In following the instructions, I put the <code>WinDialog</code> folder in the <strong>user</strong> directory <code>...plugins\Config\PythonScript\lib</code>, as instructed.  I can verify it’s there:</p>
<pre><code>&gt; cd plugins
&gt; dir
 Directory of C:\usr\local\apps\npp\npp862.ps3\plugins

02/08/2024  01:28 PM    &lt;DIR&gt;          .
02/08/2024  01:28 PM    &lt;DIR&gt;          ..
02/08/2024  01:29 PM    &lt;DIR&gt;          ColumnTools
03/29/2024  09:36 AM    &lt;DIR&gt;          Config
01/14/2024  03:33 AM    &lt;DIR&gt;          doc
02/08/2024  01:09 PM    &lt;DIR&gt;          mimeTools
02/08/2024  01:09 PM    &lt;DIR&gt;          NppConverter
02/08/2024  01:09 PM    &lt;DIR&gt;          NppExport
02/08/2024  01:12 PM    &lt;DIR&gt;          PythonScript

&gt; dir Config
 Directory of C:\usr\local\apps\npp\npp862.ps3\plugins\Config

03/29/2024  09:36 AM    &lt;DIR&gt;          .
03/29/2024  09:36 AM    &lt;DIR&gt;          ..
03/29/2024  10:27 AM               179 ColumnTools.ini
02/08/2024  01:12 PM               646 converter.ini
02/08/2024  01:07 PM           208,728 nppPluginList.dll
03/29/2024  10:23 AM    &lt;DIR&gt;          PythonScript

&gt; dir Config\PythonScript
 Directory of C:\usr\local\apps\npp\npp862.ps3\plugins\Config\PythonScript

03/29/2024  10:23 AM    &lt;DIR&gt;          .
03/29/2024  10:23 AM    &lt;DIR&gt;          ..
03/29/2024  10:08 AM    &lt;DIR&gt;          lib
03/29/2024  10:25 AM    &lt;DIR&gt;          scripts

&gt; dir Config\PythonScript\lib\WinDialog
 Directory of C:\usr\local\apps\npp\npp862.ps3\plugins\Config\PythonScript\lib\WinDialog

03/29/2024  10:08 AM    &lt;DIR&gt;          .
03/29/2024  10:08 AM    &lt;DIR&gt;          ..
03/29/2024  10:08 AM    &lt;DIR&gt;          controls
03/29/2024  10:08 AM             2,748 readme.md
03/29/2024  10:08 AM    &lt;DIR&gt;          resource_parser
03/29/2024  10:08 AM         2,145,865 test_dynamic_dialog2.gif
03/29/2024  10:08 AM    &lt;DIR&gt;          win_helper
03/29/2024  10:08 AM            22,893 __init__.py
03/29/2024  10:08 AM    &lt;DIR&gt;          __tests__
</code></pre>
<p dir="auto">If I move <code>WinDialog</code> from the user directory to the <strong>machine</strong> directory (<code>C:\usr\local\apps\npp\npp862.ps3\plugins\PythonScript\lib</code>), then the script can see WinDialog and it loads and runs fine.</p>
<p dir="auto">Is there some magic that needs to go in the <code>startup.py</code> to make PS3 see the user-lib directory for a portable installation?</p>
<p dir="auto"><strong>Debug Info</strong></p>
<pre><code>Notepad++ v8.6.2   (64-bit)
Build time : Jan 14 2024 - 02:16:00
Path : C:\usr\local\apps\npp\npp862.ps3\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 22H2
OS Build : 19045.4170
Current ANSI codepage : 1252
Plugins : 
    ColumnTools (1.4.5.1)
    mimeTools (3)
    NppConverter (4.5)
    NppExport (0.4)
    PythonScript (3.0.17)
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/93909</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93909</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 29 Mar 2024 17:40:16 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Wed, 06 Mar 2024 20:43:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/93436">Little Dialog-wrapper for PythonScript</a>:</p>
<blockquote>
<p dir="auto">z = notepad.prompt(‘prompt text:’, ‘title bar of window’, ‘’)</p>
</blockquote>
<p dir="auto">Works perfectly. Much appreciated.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/93454</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93454</guid><dc:creator><![CDATA[SN-CH]]></dc:creator><pubDate>Wed, 06 Mar 2024 20:43:14 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Wed, 06 Mar 2024 13:33:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/26773">@SN-CH</a></p>
<blockquote>
<p dir="auto">I need to pass integer argument to the Python script I run… Does it make sense to use this wrapper or is it … overkill because there is an easier way…?</p>
</blockquote>
<p dir="auto">It <em>sounds</em> like it would be overkill, but only you can judge that.</p>
<p dir="auto">About the simplest way to achieve what you are asking for is:</p>
<pre><code class="language-py">z = notepad.prompt('prompt text:', 'title bar of window', '')
if z is not None:
    z = int(z)
    print(z)
</code></pre>
<p dir="auto">which will give you a (no frills) window to enter your integer into:</p>
<p dir="auto"><img src="/assets/uploads/files/1709731064630-9143568b-5e65-4ebf-aac6-2d5e3a9007ac-image.png" alt="9143568b-5e65-4ebf-aac6-2d5e3a9007ac-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/93436</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93436</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 06 Mar 2024 13:33:18 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Wed, 06 Mar 2024 12:48:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a></p>
<p dir="auto">Good afternoon,</p>
<p dir="auto">I would appreciate if you could give me a word of advice.</p>
<p dir="auto">I wonder if solution of this thread can help me to solve the following task: I need to pass integer argument to the Python script I run in N++ with PythonScript. Does it make sense to use this wrapper or is it an overkill because there is an easier way to do this?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/93435</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93435</guid><dc:creator><![CDATA[SN-CH]]></dc:creator><pubDate>Wed, 06 Mar 2024 12:48:17 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Sat, 14 Oct 2023 12:25:49 GMT]]></title><description><![CDATA[<p dir="auto">Preview of the PR for enable/disable of controls:</p>
<p dir="auto">In <code>__control_template.py</code>, at the bottom, add two member functions to the <code>Control</code> class:</p>
<pre><code class="language-py">def enable(self, e : bool) -&gt; bool: return True if WinDLL('user32').EnableWindow(self.hwnd, e) else False

def isEnabled(self) -&gt; bool: return True if WinDLL('user32').IsWindowEnabled(self.hwnd) else False
</code></pre>
<p dir="auto">And of course, near the top of the file:</p>
<pre><code class="language-py">from ctypes import WinDLL
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/89876</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89876</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 14 Oct 2023 12:25:49 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Sat, 14 Oct 2023 11:37:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a></p>
<blockquote>
<p dir="auto">I assume this was the use-case for you wanting to capture the ESC / X events</p>
</blockquote>
<p dir="auto">My points about “modeless” and “easier saving of settings” were totally separate.</p>
<p dir="auto">I wasn’t really saying that the dialog should truly be “modeless”, because if it were, users would attempt to run other scripts after refocusing the editing window (leaving the dialog open), and PythonScript, presumably for good reasons, disallows running a second script while a first is running.</p>
<p dir="auto">So my thinking was the dialog script could end when focus is lost, to be restored when next invoked.  (Ah, okay, I see the relationship of “saving the settings” – but truly, this was an earlier, separate point).</p>
<hr />
<blockquote>
<p dir="auto">I might recommend seeing if you can get on-changed events for the individual settings controls, and have them save their settings</p>
</blockquote>
<p dir="auto">Sure.  Again, my earlier point was that this is “drudge work”.  I have to have a “click” event on every control, even one that normally doesn’t need one, just for saving its state?? How about just a single function that gets called, whenever the dialog is about to close, by any means, that allows me to do “cleanup”, be it saving settings or something else?</p>
<hr />
<blockquote>
<p dir="auto">But until I switch over to PS3 …</p>
</blockquote>
<p dir="auto">I decided to make the switch recently, although I still have to sort out some things that don’t work in scripts I had totally working under PS2.</p>
<p dir="auto">In general, I think it is time to move forward on this.  PS3 may never come out of “alpha”, because what keeps it there (lack of old encoding support) doesn’t seem to get worked on.</p>
<p dir="auto">It seems reasonable that the PS developers make v. 3.x the one that <em>Plugins Admin</em> installs, but keep 2.x around for those that use scripting with dated encodings.  Or heck, even make BOTH PS3 and PS2 installable via <em>Plugins Admin</em>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89875</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89875</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 14 Oct 2023 11:37:22 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Fri, 13 Oct 2023 19:19:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said,</p>
<blockquote>
<p dir="auto">My very first script using this wrapper is <a href="https://community.notepad-plus-plus.org/topic/25022">HERE</a> !!</p>
</blockquote>
<p dir="auto">And in chat, he asked me to give it a test drive.</p>
<p dir="auto">From the user perspective, I was able to follow the instructions on <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a>’s GitHub page to get the WinDialog directory installed in my instance, and <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a>’s instructions to run his wrapper.  So “yay” for sufficient “installation” instructions on both. :-)</p>
<blockquote>
<p dir="auto">About the only annoying thing is that the dialog is modal, i.e., one can’t switch between it and the Notepad++ editor window.  This is annoying because one <em>can</em> do this with Notepad++'s <em>Find</em> window, and thus one gets used to this behavior.</p>
</blockquote>
<p dir="auto">Indeed. Even after having read this paragraph, and <em>knowing</em> that it was modal, I still tried to change my selection in the editor without closing the dialog.  So yes, having a modeless option for dialogs would definitely help with the user interface.</p>
<blockquote>
<p dir="auto">Maybe another suggested extension is that if the dialog (is made modeless) and loses input focus, the script ends and the dialog disappears.  Sure, the user would have to restart the script (via assigned keycombo) after working in the editor window, but this isn’t too bad.  The restarted script would pick up right where the closed one was (with all settings intact).</p>
</blockquote>
<p dir="auto">Ah, I assume this was the use-case for you wanting to capture the <code>ESC</code> / <code>X</code> events <em>&lt;update&gt;-- whoops, left that sentence hanging, without explaining that I meant that I thought you wanted it to be able to save settings, without having an OK button.  I might recommend seeing if you can get on-changed events for the individual settings controls, and have them save their settings, whether or not OK (or, in your case, <strong>Count</strong>) is eventually pressed&lt;/update&gt;</em></p>
<p dir="auto">(And sorry, Alan, I know you were encouraging me to comment on the LittleDialogWrapper aspects as well – presumably from a developer perspective – to see if I could put it through more paces. But until I switch over to PS3 whenever it’s out of alpha, I’m not likely to incorporate LittleDialogWrapper into any of my scripts, because my PS installation is going to stay at whichever can be easily found in Plugins Admin, so that when I’m trying to help users with PS solutions, they won’t have an extra step of installing the alpha version of the plugin manually, or so I don’t have to go switch to a different instance of Notepad++ compared to my normal workflow.  So all I’ve got for now is what I said in April, and my brief user-perspective comments in this post.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89872</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89872</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 13 Oct 2023 19:19:39 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Fri, 13 Oct 2023 11:48:19 GMT]]></title><description><![CDATA[<p dir="auto">My very first script using this wrapper is <a href="https://community.notepad-plus-plus.org/topic/25022">HERE</a> !!</p>
<p dir="auto">I think it turned out pretty well and puts this wrapper through its paces.  :-)</p>
<p dir="auto">About the only annoying thing is that the dialog is modal, i.e., one can’t switch between it and the Notepad++ editor window.  This is annoying because one <em>can</em> do this with Notepad++'s <em>Find</em> window, and thus one gets used to this behavior.</p>
<p dir="auto">Maybe another suggested extension is that if the dialog (is made modeless) and loses input focus, the script ends and the dialog disappears.  Sure, the user would have to restart the script (via assigned keycombo) after working in the editor window, but this isn’t too bad.  The restarted script would pick up right where the closed one was (with all settings intact).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89866</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89866</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 13 Oct 2023 11:48:19 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Wed, 11 Oct 2023 16:13:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a></p>
<p dir="auto">I meant an optional user (the programmer-user) function that gets called when the dialog is closing, by whatever means.  Then there’s a chance to do things at that point, much like, but the opposite of <code>initialize()</code>.  Maybe I will think about working on that kind of thing, along with enabling/disabling of controls.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89840</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89840</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 11 Oct 2023 16:13:20 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Wed, 11 Oct 2023 15:14:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a></p>
<p dir="auto">I don’t seem to understand your use case.</p>
<p dir="auto">If I want to know if a user either pressed ESC or clicked close_X to simply exit the dialog without anything being triggered by the dialog, then I would start the dialog with a variable has_been_cancelled=True and override it with the click event of the “normal” exit_dialog_button.</p>
<p dir="auto">If that’s not what you’re looking for, maybe you can specify a simple scenario of what should be handled?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89838</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89838</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Wed, 11 Oct 2023 15:14:13 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Wed, 11 Oct 2023 14:45:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14847">@Michael-Vincent</a> said in <a href="/post/89836">Little Dialog-wrapper for PythonScript</a>:</p>
<blockquote>
<p dir="auto">They get saved.</p>
</blockquote>
<p dir="auto">It’s not what I was truly getting at, but I understand how you’ve made it work.  Thanks.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89837</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89837</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 11 Oct 2023 14:45:46 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Wed, 11 Oct 2023 13:30:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/89834">Little Dialog-wrapper for PythonScript</a>:</p>
<blockquote>
<p dir="auto">That’s why I specifically asked MV “…if user presses Esc to close the dialog, or presses the red X in the title bar of the dialog…”</p>
</blockquote>
<p dir="auto">They get saved.  That’s why I use a return class object that’s part of the main script.  So in the example I provided, I want to remember the setting for “ignore case” and “regex” so the checkboxes have an <code>onClick</code> event that toggles the boolean value stored in the return class.</p>
<pre><code class="language-Python">    def on_case(self):
        self.ret.IGNORECASE = not self.ret.IGNORECASE

    def on_regex(self):
        self.ret.REGEX = not self.ret.REGEX
</code></pre>
<p dir="auto">That happens whenever the users clicks the checkbox.  So if they later just press ‘Esc’ or red ‘X’, the value has already been stored and then next time it launches, it is checked (or unchecked) appropriately in the <code>initialize()</code>.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89836</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89836</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Wed, 11 Oct 2023 13:30:50 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Wed, 11 Oct 2023 12:35:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a></p>
<p dir="auto">BTW, I sort of missed this at first from the github page:</p>
<blockquote>
<p dir="auto">help(WinDialog)</p>
</blockquote>
<p dir="auto">I guess I’m just not used to documentation being provided in only this way, at least not any more.  It’s totally fine, though, just maybe not super obvious for a newbie (would there be any newbies wanting to experiment with LDW??).</p>
<p dir="auto">So maybe I’ll offer this on the off-chance that a newbie is reading; this is what I did to make it easier to refer to (note: nothing rocket sciencey here…):</p>
<ul>
<li>go to PythonScript console window area, right-click, and choose  <em>Clear</em> from the popup menu</li>
<li>at the <code>&gt;&gt;&gt;</code> prompt, type <code>import WinDialog</code> and press return</li>
<li>type <code>help(WinDialog)</code> and press return</li>
<li>right-click again and choose <em>Select All</em> and then press Ctrl+c</li>
<li>create a new tab in Notepad++ and paste there</li>
<li>save the tab for later reference</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/89835</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89835</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 11 Oct 2023 12:35:06 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Wed, 11 Oct 2023 12:18:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a> said in <a href="/post/89833">Little Dialog-wrapper for PythonScript</a>:</p>
<blockquote>
<p dir="auto">… use the control events to get the values you need.</p>
</blockquote>
<p dir="auto">Sure, but that’s the obvious case.</p>
<p dir="auto">That’s why I specifically asked MV “…if user presses Esc to close the dialog, or presses the red X in the title bar of the dialog…”</p>
<p dir="auto">As far as I can tell, and yes I’ve read some of the docs now :-), these aren’t capturable events?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89834</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89834</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 11 Oct 2023 12:18:17 GMT</pubDate></item><item><title><![CDATA[Reply to Little Dialog-wrapper for PythonScript on Wed, 11 Oct 2023 12:02:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a></p>
<p dir="auto">You have an initial state when you start the dialog and from there I would use the control events to get the values you need. Something like</p>
<pre><code class="language-py">from WinDialog import Dialog, CheckBoxButton
from WinDialog.controls.button import BST

class Example(Dialog):
    def __init__(self):
        super().__init__(size=(100, 100))
        self.counter = 0
        self.btn1 = CheckBoxButton(title='Click me', position=(35, 40), size=(50, 14))
        self.btn1.onClick = self.on_click
        self.show()

    def initialize(self):
        self.btn1.setCheckState(BST.CHECKED)
        
    def on_click(self):
        self.counter += 1
        
e = example()
print(e.counter)
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/89833</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89833</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Wed, 11 Oct 2023 12:02:41 GMT</pubDate></item></channel></rss>