<?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[Python / Lua Script: Detect if a modifier is pressed when running a script]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">How can I detect if a modifier was pressed when the user executed a script?</p>
<p dir="auto">Detecting a right-click would be better (i.e. execute the script on both left/right-click and detect the button).</p>
<p dir="auto">BTW,  there seems to be a bug in Python Script: if you press Ctrl when running a script, the “File not found. Create it?” message is displayed.<br />
It works fine in <a class="plugin-mentions-user plugin-mentions-a" href="/user/dail" aria-label="Profile: dail">@<bdi>dail</bdi></a>’s Lua Script.</p>
<p dir="auto">Thank you.</p>
<p dir="auto">Best regards.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/13510/python-lua-script-detect-if-a-modifier-is-pressed-when-running-a-script</link><generator>RSS for Node</generator><lastBuildDate>Sat, 12 Sep 2026 12:22:51 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/13510.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Mar 2017 21:32:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Tue, 04 Apr 2017 04:02:47 GMT]]></title><description><![CDATA[<p dir="auto">Hello Claudia,</p>
<blockquote>
<p dir="auto">did try to understand what the difference could be but …<br />
…<br />
I would love to see why our machines behave differently but without a debugging environment it’s hard to track down the issue…</p>
</blockquote>
<p dir="auto">I apologize for not being clear enough in my last post.<br />
In “Very nice” I meant to confirm the issue was solved by adding <code>console.show()</code>. :)</p>
<blockquote>
<p dir="auto">The file StaticDialog.cpp has a function makeRTLResource.<br />
Within the function there is this if condition</p>
</blockquote>
<p dir="auto">Thank you very much for that too.<br />
A couple of years ago Dave uploaded a <a href="https://sourceforge.net/p/npppythonscript/discussion/1188886/thread/b882571d/#becc" rel="nofollow ugc">PythonScript v1.1.1</a> without committing the changes.<br />
As your script works perfectly, I’d rather keep using v1.1.1.</p>
<p dir="auto">Many thanks again for your kind help. I do appreciate it.</p>
<p dir="auto">Best regards.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23310</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23310</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Tue, 04 Apr 2017 04:02:47 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 22:46:42 GMT]]></title><description><![CDATA[<p dir="auto">Yaron,</p>
<p dir="auto">did try to understand what the difference could be but …<br />
While investigating the python script code I assume I found what needs to be changed in<br />
order to force a LTR layout.</p>
<p dir="auto">The file StaticDialog.cpp has a function makeRTLResource.<br />
Within the function there is this if condition</p>
<pre><code>if (pMyDlgTemplateEx-&gt;signature == 0xFFFF)
	pMyDlgTemplateEx-&gt;exStyle |= WS_EX_LAYOUTRTL;
else
	(*ppMyDlgTemplate)-&gt;dwExtendedStyle |= WS_EX_LAYOUTRTL;
</code></pre>
<p dir="auto">what about giving a try to use</p>
<pre><code>if (pMyDlgTemplateEx-&gt;signature == 0xFFFF)
	pMyDlgTemplateEx-&gt;exStyle;
else
	(*ppMyDlgTemplate)-&gt;dwExtendedStyle;
</code></pre>
<p dir="auto">Yaron, sorry, I would love to see why our machines behave differently but without a debugging environment it’s hard to track down the issue maybe this little code change is a better alternative.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23307</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23307</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 22:46:42 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:50:25 GMT]]></title><description><![CDATA[<p dir="auto">Very nice.</p>
<p dir="auto">Thanks again. Highly appreciated.</p>
<p dir="auto">Good night. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23302</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23302</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:50:25 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:46:51 GMT]]></title><description><![CDATA[<p dir="auto">Thank you :-D</p>
<p dir="auto">Did some last test - looks like it a<br />
console.show()<br />
before the code<br />
and if you wish<br />
console.hide()<br />
afterwards does the trick.</p>
<p dir="auto">Good night.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23301</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23301</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:46:51 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:45:40 GMT]]></title><description><![CDATA[<p dir="auto">Claudia,</p>
<p dir="auto">Thank you very much. You are great!</p>
<p dir="auto"><img src="https://cloud.githubusercontent.com/assets/10229320/24593891/5b550f6e-1830-11e7-8cce-898647ff6792.png" alt="default" class=" img-fluid img-markdown" /></p>
<p dir="auto">Sorry for keeping you up so late.<br />
Sleep well and have a nice day. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23300</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23300</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:45:40 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:39:44 GMT]]></title><description><![CDATA[<p dir="auto">Yaron,</p>
<p dir="auto">strange - might be linux/windows related.<br />
I’ve copied your <a href="http://startup.py" rel="nofollow ugc">startup.py</a> - cleaned mine (commented everything)<br />
and now I have your behavior. Phew …</p>
<p dir="auto">Yaron, it is already half past 4 here and I have to go to late shift today.<br />
Need to have some sleep ;-) I will follow up on this in ~16 hours.<br />
Maybe earlier if we don’t have to do much at work and I can have look.</p>
<p dir="auto">Good night.<br />
Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23299</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23299</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:39:44 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:35:13 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">When I run a second time from my test script it doesn’t change until<br />
another write statement happens, then it is back to LTR.</p>
</blockquote>
<p dir="auto">On my machine it changes immediately. It’s gibberish until writing again.</p>
<p dir="auto">Thanks.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23298</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23298</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:35:13 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:29:50 GMT]]></title><description><![CDATA[<p dir="auto">Interesting.</p>
<blockquote>
<p dir="auto">May you share your <a href="http://startup.py" rel="nofollow ugc">startup.py</a>?</p>
</blockquote>
<p dir="auto">I missed that. Sorry.</p>
<pre><code># The lines up to and including sys.stderr should always come first
# Then any errors that occur later get reported to the console
# If you'd prefer to report errors to a file, you can do that instead here.
import sys
from Npp import *

# Set the stderr to the normal console as early as possible, in case of early errors
sys.stderr = console

# Define a class for writing to the console in red
class ConsoleError:
	def __init__(self):
		global console
		self._console = console;

	def write(self, text):
		self._console.writeError(text);

# Set the stderr to write errors in red
sys.stderr = ConsoleError()

# This imports the "normal" functions, including "help"
import site

# This sets the stdout to be the currently active document, so print "hello world",
# will insert "hello world" at the current cursor position of the current document
sys.stdout = editor

##################################################


from ctypes import windll, byref, wintypes, WINFUNCTYPE, Structure, sizeof

WNDENUMPROC = WINFUNCTYPE(wintypes.BOOL,
                          wintypes.HWND,
                          wintypes.LPARAM)


python_script_hwnd = None
python_script_sci_handle = None

GWL_EXSTYLE = -20
WS_EX_LAYOUTRTL = 0x00400000

def EnumCallback(hwnd, lparam):
    global python_script_hwnd
    global python_script_sci_handle
    
    curr_class = (wintypes.WCHAR * 256)()
    curr_name = (wintypes.WCHAR * 256)()
   
    windll.user32.GetClassNameW(hwnd, curr_class, 256)
    windll.user32.GetWindowTextW(hwnd, curr_name, 256)

    if curr_name.value.lower() == 'python script':
        python_script_hwnd = hwnd
    else:
        if python_script_hwnd is not None:
            if curr_class.value.lower() == 'scintilla':
                if windll.user32.GetParent(hwnd) == python_script_hwnd:
                    python_script_sci_handle = hwnd
                    return False
       
    return True

parent = windll.user32.FindWindowA('Notepad++', None)
windll.user32.EnumChildWindows(parent, WNDENUMPROC(EnumCallback), 0)
windll.user32.EnumChildWindows(python_script_hwnd, WNDENUMPROC(EnumCallback), 0)

exStyle = windll.user32.GetWindowLongA(python_script_sci_handle, GWL_EXSTYLE)

if (exStyle &amp; WS_EX_LAYOUTRTL):
    console.write('exStyle &amp; WS_EX_LAYOUTRTL: {}\n'.format('exStyle &amp; WS_EX_LAYOUTRTL'))
    exStyle = exStyle ^ WS_EX_LAYOUTRTL
else:
    console.write('exStyle | WS_EX_LAYOUTRTL:{}\n'.format(exStyle | WS_EX_LAYOUTRTL))
    exStyle = exStyle | WS_EX_LAYOUTRTL
windll.user32.SetWindowLongA(python_script_sci_handle, GWL_EXSTYLE, exStyle);
console.write('test\n')
</code></pre>
<p dir="auto">Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23297</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23297</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:29:50 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:28:18 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">Do you mean the output is RTL when you open the console?</p>
</blockquote>
<p dir="auto">yes, on my side it is.</p>
<p dir="auto">When I run a second time from my test script it doesn’t change until<br />
another write statement happens, then it is back to LTR.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23296</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23296</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:28:18 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:25:50 GMT]]></title><description><![CDATA[<p dir="auto">Claudia,</p>
<blockquote>
<p dir="auto">Strange - works for me.</p>
</blockquote>
<p dir="auto">Do you mean the output is <em>RTL</em> when you open the console?</p>
<p dir="auto">I’ve removed my other code for testing it.</p>
<p dir="auto">Actually I don’t need it on startup. I can write a “Show Console” script.</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23295</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23295</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:25:50 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:22:05 GMT]]></title><description><![CDATA[<p dir="auto">Strange - works for me.<br />
Could it be that you already have some ctypes based code in <a href="http://startup.py" rel="nofollow ugc">startup.py</a>?<br />
Variable overwriting?<br />
May you share your <a href="http://startup.py" rel="nofollow ugc">startup.py</a>?<br />
Or maybe comment everything except the LTR code if you have already ctypes code.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23294</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23294</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:22:05 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:13:09 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">So, just to clarify, this works?</p>
</blockquote>
<p dir="auto">Yes, it does.</p>
<blockquote>
<p dir="auto">and there seem to be a trap. The console changes it output only if something is<br />
written to the output. So the initial state will be RTL until something gets written.</p>
</blockquote>
<p dir="auto">If I put the code in <a href="http://startup.py" rel="nofollow ugc">startup.py</a> it doesn’t work even after writing to the console.</p>
<p dir="auto">Thanks again. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23293</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23293</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:13:09 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 02:05:19 GMT]]></title><description><![CDATA[<p dir="auto">and there seem to be a trap. The console changes it output only if something is<br />
written to the output. So the initial state will be RTL until something gets written.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23292</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23292</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 02:05:19 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:58:33 GMT]]></title><description><![CDATA[<p dir="auto">Yaron,</p>
<p dir="auto">this seems to be my waterloo in terms of understanding bitwise operations.<br />
I always confuse when to use OR and when XOR.</p>
<p dir="auto">So, just to clarify,  this works?</p>
<pre><code>if (exStyle &amp; WS_EX_LAYOUTRTL):
    console.write('exStyle &amp; WS_EX_LAYOUTRTL: {}\n'.format('exStyle &amp; WS_EX_LAYOUTRTL'))
    exStyle = exStyle ^ WS_EX_LAYOUTRTL
else:
    console.write('exStyle | WS_EX_LAYOUTRTL:{}\n'.format(exStyle | WS_EX_LAYOUTRTL))
    exStyle = exStyle | WS_EX_LAYOUTRTL
windll.user32.SetWindowLongA(python_script_sci_handle, GWL_EXSTYLE, exStyle);
console.write('test\n')
</code></pre>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23291</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23291</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:58:33 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:51:29 GMT]]></title><description><![CDATA[<pre><code>parent:11404816
name:selected tab
class:#32770
name:caption
class:button
name:
class:static
name:python script
class:#32770
name:parent:11404816
name:selected tab
class:#32770
name:caption
class:button
name:
class:static
name:python script
class:#32770

class:scintilla
--------------------
python_script_hwnd:4392424
name:parent:11404816
name:selected tab
class:#32770
name:caption
class:button
name:
class:static
name:python script
class:#32770
name:parent:11404816
name:selected tab
class:#32770
name:caption
class:button
name:
class:static
name:python script
class:#32770

c
class:scintilla
exStyle:4194304
exStyle &amp; WS_EX_LAYOUTRTL:4194304
test
</code></pre>
<p dir="auto">Both <code>exStyle = exStyle &amp; (~WS_EX_LAYOUTRTL)</code> and <code>exStyle = exStyle ^ WS_EX_LAYOUTRTL</code> do change the the layout.</p>
<p dir="auto">I have to clear the output first. Otherwise it’s gibberish.</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23290</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23290</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:51:29 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:43:34 GMT]]></title><description><![CDATA[<p dir="auto">Maybe XOR<br />
exStyle = exStyle ^ WS_EX_LAYOUTRTL</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23289</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23289</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:43:34 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:42:51 GMT]]></title><description><![CDATA[<p dir="auto">Could you do me a favor and run the following script</p>
<pre><code>WNDENUMPROC = WINFUNCTYPE(wintypes.BOOL,
                          wintypes.HWND,
                          wintypes.LPARAM)


python_script_hwnd = None
python_script_sci_handle = None

GWL_EXSTYLE = -20
WS_EX_LAYOUTRTL = 0x00400000

def EnumCallback(hwnd, lparam):
    global python_script_hwnd
    global python_script_sci_handle
    
    curr_class = (wintypes.WCHAR * 256)()
    curr_name = (wintypes.WCHAR * 256)()
   
    windll.user32.GetClassNameW(hwnd, curr_class, 256)
    windll.user32.GetWindowTextW(hwnd, curr_name, 256)
    console.write('name:{}\n'.format(curr_name.value.lower()))
    console.write('class:{}\n'.format(curr_class.value.lower()))
    if curr_name.value.lower() == 'python script':
        python_script_hwnd = hwnd
    else:
        if python_script_hwnd is not None:
            if curr_class.value.lower() == 'scintilla':
                if windll.user32.GetParent(hwnd) == python_script_hwnd:
                    python_script_sci_handle = hwnd
                    return False
       
    return True

parent = windll.user32.FindWindowA('Notepad++', None)
console.write('parent:{}\n'.format(parent))
windll.user32.EnumChildWindows(parent, WNDENUMPROC(EnumCallback), 0)
console.write('{}\n'.format('-'*20))
console.write('python_script_hwnd:{}\n'.format(python_script_hwnd))
windll.user32.EnumChildWindows(python_script_hwnd, WNDENUMPROC(EnumCallback), 0)

exStyle = windll.user32.GetWindowLongA(python_script_sci_handle, GWL_EXSTYLE) # GWL_EXSTYLE
console.write('exStyle:{}\n'.format(exStyle))

if (exStyle &amp; WS_EX_LAYOUTRTL):
    console.write('exStyle &amp; WS_EX_LAYOUTRTL:{}\n'.format(exStyle &amp; WS_EX_LAYOUTRTL))
    exStyle = exStyle &amp; WS_EX_LAYOUTRTL
else:
    console.write('exStyle | WS_EX_LAYOUTRTL:{}\n'.format(exStyle | WS_EX_LAYOUTRTL))
    exStyle = exStyle | WS_EX_LAYOUTRTL
windll.user32.SetWindowLongA(python_script_sci_handle, GWL_EXSTYLE, exStyle);
console.write('test\n')
</code></pre>
<p dir="auto">and please post the output</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23288</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23288</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:42:51 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:40:16 GMT]]></title><description><![CDATA[<p dir="auto"><code>exStyle = exStyle &amp; (~WS_EX_LAYOUTRTL)</code></p>
<p dir="auto">I’m testing it.</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23287</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23287</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:40:16 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:36:38 GMT]]></title><description><![CDATA[<p dir="auto">It does write to the console.</p>
<blockquote>
<p dir="auto">If so we have to change the logic about exstlye…</p>
</blockquote>
<p dir="auto">Indeed. :)</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23285</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23285</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:36:38 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:28:37 GMT]]></title><description><![CDATA[<p dir="auto">Yaron,<br />
no I meant using the GetWindowLongA as I did.<br />
Btw. it looks like 32bit Python has to use GetWindowLong whereas 64bit Python<br />
uses GetWindowLongPtr.</p>
<p dir="auto">So make a normal script, use my code and print something to the console at the very end of the script just to see if the output is seen. If this is the case run another time and see if something changes. If so we have to change the logic about exstlye…</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23284</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23284</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:28:37 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:23:35 GMT]]></title><description><![CDATA[<p dir="auto">Claudia,</p>
<p dir="auto">I had put the code in <a href="http://startup.py" rel="nofollow ugc">startup.py</a>. I’ve now moved it to a separate script and run it twice.</p>
<p dir="auto"><img src="https://cloud.githubusercontent.com/assets/10229320/24592765/9c5bdfbc-1824-11e7-8eea-4847320219eb.png" alt="default" class=" img-fluid img-markdown" /></p>
<blockquote>
<p dir="auto">can you do an test output to the console (preferred last line of code)</p>
</blockquote>
<p dir="auto">I’m not sure what you mean.</p>
<p dir="auto">Aren’t you tired? Should we continue tomorrow? :)</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23283</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23283</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:23:35 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:12:35 GMT]]></title><description><![CDATA[<p dir="auto">Yaron</p>
<p dir="auto">can you do an test output to the console (preferred last line of code) and run the script at least two times. Let me check about the Set/GetWindowLongPtrW.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23282</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23282</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:12:35 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:09:18 GMT]]></title><description><![CDATA[<p dir="auto">Hello again,</p>
<p dir="auto">I get the same error.<br />
No errors with <code>Get/SetWindowLongA</code> but the script doesn’t work. :)</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23281</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23281</guid><dc:creator><![CDATA[Yaron]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:09:18 GMT</pubDate></item><item><title><![CDATA[Reply to Python / Lua Script: Detect if a modifier is pressed when running a script on Mon, 03 Apr 2017 01:05:46 GMT]]></title><description><![CDATA[<p dir="auto">Hi Yaron,<br />
you have to use either the ansi or unicode version</p>
<p dir="auto">Unicode and ANSI names GetWindowLongPtrW (Unicode) and GetWindowLongPtrA (ANSI)</p>
<p dir="auto">Same is true for Set…</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23280</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23280</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 03 Apr 2017 01:05:46 GMT</pubDate></item></channel></rss>