Mouse position and MZScript Thread last updated on 2007-02-21 18:39:46

Posted by member 256241 on 2007-02-19 20:21:57

Hello good people,

I am shifting from using !PopupTasks to xTaskbar hooked into an xPopup. However, using xTaskbar mousewheel scrolling down a vertical list doesn't seem to work, so I was hoping to use a bang to change the mouses position (on scrolling the mouse over the popup the mouses position would be forcefully changed up and down the list - just like it is in xpopup). I found the module MoveMouse, which works. However, I don't really understand how variables work, no matter what I do I cannot get !movemouse (or indeed display in a label) the current MouseX and MouseY (vars in MZscript). My ideal solution would be something like:

!MoveMouse (mousex) (mousey-20), though any commands using mousex/mousey fling it to coordinate 0,0. I used the syntax %{mousex}, and other variations I could think of in my frustration to coax a response from it.



Is there an example of this somewhere? I presume I'm just making some silly mistake but I've been banging my head for a few hours now and could really use some expert advice.

Thanks for reading :).



Oh, also, it seems that rainmeter cannot be hooked, is there a system monitor that can be hooked?

Posted by member 212670 on 2007-02-19 20:55:02 link

%{mousey} and %{mousex} are correct syntax, but in order for them to be parsed, you either have to use them inside an actual mzscript, or, you have to prefix what you're doing with !exec (that tells the mzvars to be expanded).

So, something like: !exec !MoveMouse %{mousex} %#%{mousey} - 20%#

The %#...%# is necessary to make it perform the math operation.

For the rainmeter replacement: xStatsGraph

Posted by member 256241 on 2007-02-19 22:08:03 link

Thanks xcal, great stuff.

Um, Im still having no luck though. I think MZScript itself might be going iffy... I can't even have a script call a recycle:

*Script bang !movedown
*script exec !recycle
*Script ~bang

and I don't know if the MZscript SHOULD be able to read normal litestep stuff, even a *hotkey wont work in the script file. It's given the right script file, the module's loaded, yet it seems not to function...

Using the !exec thing as you suggested didn't work either.

Thanks :)


Is this a glaringly obvious set up mistake?

Posted by member 5575 on 2007-02-19 22:09:22 link

1) Do the mzscript bangs show up in the !about box? If not, then the file isn't being loaded properly.

2) xstatsgraph can be hooked; it's only available at ls-universe.info ATM.

Posted by member 256241 on 2007-02-19 22:31:52 link

Ah, that's neat, hadn't seen that about box before. It isn't in there, so I suppose that's the route cause of all of this - I'll get into that after some sleep.

Thanks for the pointers.

Posted by member 212670 on 2007-02-19 22:35:15 link

What version of mzscript are you using? I use mzscript-1.0-rc2. (Actually, I don't really use mzscript anymore - but I did test that in a theme that uses it.)

edit - nm, so it looks like it's not loading.

Posted by member 256241 on 2007-02-20 06:56:40 link

Okay, so it turns out I had to rename the dll from MZscript to a full name with version info... Or something - well, it works now and the mouse scripting works as is to be expected.

Thanks for the help.



However, when hooking xTaskbar into xPopup, the command:
*Popup !hook:0:0:200:700 !xTaskbarLSBoxHook xTaskbar%%!xTaskbarMove%%
The error "You need to specify the TaskbarName after !..hook, if you want to hook this...". I haven't named my xTaskbar, though xTaskbar itself doesn't work, and using no parameter here doesn't work...


Any hints? Thanks.

Posted by member 5575 on 2007-02-20 09:17:49 link

I do it like so:

*mainBarModuleHook !xTaskbarLSBoxHook xtaskbar

That's with a label though. I never tried it with a popup before.

Posted by member 256241 on 2007-02-21 17:01:14 link

I thought I made another thread but I don't see it.. Deleted maybe? [edit]Sorry, my bad, moved to this section[/edit]

Anyways, has anyone managed to hook xTaskbar into xPopup? Are there common reasons that the taskbarname in the hook command doesn't stick?


Help is much appreciated.

Posted by member 212670 on 2007-02-21 18:39:46 link