Page 1 of 1

Slight modification to 'Send Message' action - negative lParam

Posted: Thu Oct 29, 2020 10:05 pm
by maeslin
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\ 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)

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

Posted: Fri Oct 30, 2020 6:29 am
by Sem;colon
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?

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

Posted: Sun Nov 01, 2020 11:55 pm
by maeslin
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.