Page 2 of 2

Posted: 07 Aug 2008 15:30
by TheQwerty
admin wrote::? All commands have static IDs! Which one do think changed? if that happened then it is a bug!
Well for use via SendMessage/PostMessage in AutoHotkey they have most definitely changed.

Show/Hide Nav. Panel
Show/Hide Tree
Show/Hide Catalog

To reliably trigger those commands from AHK, I've been using: SendMessage 0x111, 354
Which means it's sending a WM_COMMAND (0x111) to control 354, which should be the menu item for Show/Hide Nav. Panel. According to Winspector the 354 should now be 358.


To be honest I'm a bit out of my comfort zone when it comes to Send/Post Message and the Window commands, so I don't fully understand it and there might be a better way, but I have no idea what.


I've always thought the Control ID used here would be the same as the menu ID, but if they have static IDs, then I'm wrong. :oops:

Posted: 07 Aug 2008 15:53
by admin
TheQwerty wrote:
admin wrote::? All commands have static IDs! Which one do think changed? if that happened then it is a bug!
Well for use via SendMessage/PostMessage in AutoHotkey they have most definitely changed.

Show/Hide Nav. Panel
Show/Hide Tree
Show/Hide Catalog

To reliably trigger those commands from AHK, I've been using: SendMessage 0x111, 354
Which means it's sending a WM_COMMAND (0x111) to control 354, which should be the menu item for Show/Hide Nav. Panel. According to Winspector the 354 should now be 358.


To be honest I'm a bit out of my comfort zone when it comes to Send/Post Message and the Window commands, so I don't fully understand it and there might be a better way, but I have no idea what.


I've always thought the Control ID used here would be the same as the menu ID, but if they have static IDs, then I'm wrong. :oops:
I was referring to the function ID used in scripting.

Posted: 07 Aug 2008 15:56
by TheQwerty
admin wrote:I was referring to the function ID used in scripting.
Nope, those are probably the same, but there is no means for me to nicely use those in AutoHotkey.

And I can't convert the script to an XY script since there is (currently) no way to determine the present state of the panels.

Posted: 07 Aug 2008 16:02
by admin
TheQwerty wrote:
admin wrote:I was referring to the function ID used in scripting.
Nope, those are probably the same, but there is no means for me to nicely use those in AutoHotkey.

And I can't convert the script to an XY script since there is (currently) no way to determine the present state of the panels.
It will come...

Posted: 07 Aug 2008 22:11
by Pagat
Maybe it's possible for Don to add some kind of Windows-SendMessage Interface so that one can send a special message to XY from an external application (function ID sent as wParam or lParam)? Don't know how much work it would be or if there would be any demand for it. Just thought of it because my favorite mediaplayer (ZoomPlayer) has this kind of interface to remoe control it (for mediaplayer it's a must, but for a filemanager... hm...)

Posted: 07 Aug 2008 22:13
by admin
Pagat wrote:Maybe it's possible for Don to add some kind of Windows-SendMessage Interface so that one can send a special message to XY from an external application (function ID sent as wParam or lParam)? Don't know how much work it would be or if there would be any demand for it. Just thought of it because my favorite mediaplayer (ZoomPlayer) has this kind of interface to remoe control it (for mediaplayer it's a must, but for a filemanager... hm...)
Puuuh, yeah, possible, but do I want this?... no head for it right now...

Posted: 08 Aug 2008 00:13
by Pagat
admin wrote:Puuuh, yeah, possible, but do I want this?... no head for it right now...
yep, i thought so... was just an idea. and if there is a way to determine the present state of the panels in a future version it's obsolete anyway...

Posted: 08 Aug 2008 00:41
by TheQwerty
Well, what would make more sense than doing all that to work with SendMessage calls, would be to allow XY to accept and execute scripts from the command prompt and also make a new instance of XY check and communicate with an existing instance before doing so.

That would be more practical and is partially on the road map anyway.

Then I could have AHK do the panel detection and calling to XY with the proper script command.


All of that said I do have a new thought on how to detect the panels via XYS that I'll give a try tomorrow.

Posted: 08 Aug 2008 14:04
by TheQwerty
Okay.. it worked.
See here: http://www.xyplorer.com/xyfc/viewtopic. ... 4904#24904

Unfortunately to work it needs to save the configuration each time it is called (so it can retrieve the current panel settings). I don't particularly like having to do that, but it shouldn't be a problem for most users.