Math Operators in Hotkeys.rc Thread last updated on 2007-08-09 17:24:38

Posted by member 379790 on 2007-08-06 20:48:28

so i've been looking for a Module to set the windows system volume. i believe i found what i was looking for in tVol 0.2, but it lacks bangs for volume up and down. what it DOES have is volumeget and volumeset, now i could utilize this for my multimedia keyboard if only i knew how to use math operators in hotkeys.rc

something along the lines of
*hotkey .none vk_volup !tvolset(tvolget+blah)

anybody know of the proper syntax?

Posted by member 256241 on 2007-08-07 06:14:59 link

I'd just do something lame in mzscript probably:

*script bang volup
*script exec !varset volume tvolget
*script exec !tvolset %#volume + 5%#
*script ~bang

Certainly not the best way to do it though.

Posted by member 212670 on 2007-08-07 07:33:52 link

Look in to v_bang lite.

Posted by member 32550 on 2007-08-07 09:33:44 link

With xLabel:
*hotkey .none vk_volup !execute [!tvolget][!parseevars !tvolset %#tVolVolume +- blah%#]

Should work, but i don't have tested it.

Posted by member 379790 on 2007-08-07 14:27:08 link

@xcal: i did look into v_bang lite, and it didn't seem to be dealing w/ the system volume (at least not the one you get to from the Windows Play Control)

@ls-universe: could you possibly explain the code or find a readme for xlabel for me? i just looked around for a half hour and found a lot of people lack the readme anyways, but the one reference i found in the help cfg for "!execute" only shows half the code and doesn't really explain what is going on anyway. basically, i have no clue what your code means, and would LOVE an explanation so i could get this running.

Posted by member 379790 on 2007-08-07 14:33:32 link

@xcal: i'm sorry, i'm a fool. in the v_bang readme, it specifies that a channel needs to be named. i specified 0... which DIDN'T affect the system volume. apparently blank does affect the system volume. thanks for your help guys. v_bang-lite solves my problem after all.

Posted by member 32550 on 2007-08-08 12:19:04 link

In case you're still interested in xLabel, ...!
1. Check http://www.ls-universe.info regularily
2. Check out http://www.xdocs.ls-universe.info
3. The Docs are in the Docs folder (or always in the Module Archives (.zip) in yoour Litestep/Modules/Archive).
If they (xLabel.chm) aren't in the Litestep/Modules/Docs folder, then see 4.
4. Update NetloadModule2 to version 2.5.0 (maybe even the LSBuild) -> there's a link at http://www.ls-universe.info

Good luck!

Posted by member 362901 on 2007-08-09 10:41:45 link

It would be great if you shared what you ended up doing to adjust your volume with !bang commands. Just copy and paste in a new forum message in the "code" section...

Posted by member 212670 on 2007-08-09 13:38:09 link

Posted by member 379790 on 2007-08-09 17:24:38 link

@DewAzureToad: like i said, i ended up using v_bang. it was just that simple. the bang commands offered by v_bang do control the WINDOWS volume, unlike so many of the other volume controls out there.