Slight modification to 'Send Message' action - negative lParam

Got a good idea? You can suggest new features here.
Post Reply
maeslin
Posts: 4
Joined: Tue Oct 27, 2020 4:14 pm

Slight modification to 'Send Message' action - negative lParam

Post by maeslin » Thu Oct 29, 2020 10:05 pm

As it stands, it is not possible through the GUI to set negative lParam values in the 'Send Message' action.
It however works perfectly when modifying the .egtree xml file by hand and reloading it.

Would it be possible to tweak the GUI to allow that? Some actions, such as setting the parameters of a scroll bar, can require negative lParam values.

For now I've done a quick and dirty hackjob of changing the range in EventGhost\plugins\Window\__init__.py from an unsigned 32-bit int to a signed 32-bit int. Seems to work well enough but I haven't debugged it anywhere beyond 'does it work and not crash in my specific use case'.

Old line 635:
lParamCtrl = panel.SpinIntCtrl(lParam, max=4294967295)

New line 635:
lParamCtrl = panel.SpinIntCtrl(lParam, min=-2147483648, max=2147483647)

User avatar
Sem;colon
Plugin Developer
Posts: 753
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Slight modification to 'Send Message' action - negative lParam

Post by Sem;colon » Fri Oct 30, 2020 6:29 am

Hi maeslin,

I think that's exactly the modification that has to be made here :)
Do you want to create the PR for that on GitHub?
If you like my work, Image me a drink :wink:

maeslin
Posts: 4
Joined: Tue Oct 27, 2020 4:14 pm

Re: Slight modification to 'Send Message' action - negative lParam

Post by maeslin » Sun Nov 01, 2020 11:55 pm

I'll see what I can do! I'm not familiar with using GitHub, but I might add a few SendMessage constants (lines 596-600) while I'm at it.

Actually, that might involve a more serious alteration of the Window plugin (significantly beyond my meager skills) but would it be possible to allow it to parse variables for SendMessage parameters? (somehow incorporating eg.parseString() I guess)

It would greatly simplify automation for a few things without having to resort to full-out scripting.


Since the Window plugin is built-in I have no idea who would normally look after it.

Post Reply