I find that !CommandToggle is missing with lsxcommand. I've created !HideCommand and !ShowCommand bangs that show and hide the command box and the surrounding image. Now I was looking to create a !ToggleCommand but how do I toggle the command box? Is there some variable that I can use in an if-statement which tells if the command is shown or not? I've tried adding "shown 0" and "shown 1" to the !hide and !show bangs but it doesn't seem to work (using Sciscript.dll).
Also CommandFocus seems to be "missing" in lsxcommand.dll. Is there some other way of giving the command box focus?
I would also like to be able to read the position of the mouse so I can !CommandMove the command box on !show.
Ok. I've decided to change my theme a little which brings up a new problem. I'm only using the !ShowCommand bang now, and then I've added "CommandHideOnUnfocus" to my step.rc. Now I also want to hide the surrounding image, when the command box is hidden. Can anyone help me on that? I would still like it if you could answer my previous question though since it would be good to know.
!FocusCommand works just fine for me.
ahh. It's just that the documents says !CommandFocus. Thanks for the help on that.
ok. I've but the whole thing into an LSbox now. It's solved some of my problems like toggleing the whole thing and the ability of popping up at the mouse postion - this only works first time after a recycle when I actually load the box so I would still like to know how to read the mouse position so that I can !LSBoxMoveBox.
The box also seem to be a bit buggy.
*Hotkey Win C !execute [!LsBoxCreate command.box] [!FocusCommand]
will always open the box, but sometimes it disappears again instantly. This is due to "LsboxAutoHide" which I have set in command.box. But this shouldn't affect the box since it gains focus both on creation and from !FocusCommand. Is there someway to get around this bug or do I have to live with it?
Humm, I'm not using LSBox for a while, but I could give you some tricks:
- Use mzscript.dll. It gives you vars like %{MouseX} and %{MouseY}. Then you can easily write things like !Exec !LsBoxMoveBox %{MouseX} %{MouseY}
- I don't know why you use !LsBoxCreate. I recommend to create boxes only one time and use !LsBoxShow, !LsBoxHide. I don't know if creating several times the same box could be buggy or not, but I guess it's not a good way...
- I don't know how LsBoxAutoHide works. Perhaps when LsxCommand get the focus, the box loose its own focus... Ty another way...
It isn't smart to create it all the time, but I did that to make the box popup at mouse location. I've changed it now to load hidden at start up and the show on my hotkey but it still has the same bug. The box doesn't loose focus when the command gains focus 'cause it works sometimes.
thanks. mzscript helped me out, now it's just the way I wanted it to be except it's still a little buggy on the focus issue.