Sign in to follow this  
Followers 0
pekster

Volume keystrokes

16 posts in this topic

I'm running XP, and I couldn't get the volume keystrokes such as {VOLUME_UP} and {VOLUME_DOWN} to work. Ideally, I wanted to register a hotkey to them, but I couldn't even get them to send for me with Send("{VOLUME_UP 10}") or something basic like that (I also tried an increased send key delay of 100, but it did nothing.)

Have other people with media keyboards been successful with registering a hotkey? How about people with 2000 or XP when using my Send listed above? It seems like a rather windows thing to break my key, but it would be nice if it worked.

Just for fun, I checked in TweakUI Tools, and those two keys are registered to the "default actions" for them. I also know that those keys work on this keyboard, because I used them with my family's computer a couple days ago to increase the volume on the PC there.


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites



why not use SoundSetWaveVolume ? ok, nevermind, because it has no way of getting the current volume and incrementally adjusting it.

why cruel world, why? why can't autoit tell us what the wav volume is now?


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

why not use SoundSetWaveVolume ?  ok, nevermind, because it has no way of getting the current volume and incrementally adjusting it.

why cruel world, why?  why can't autoit tell us what the wav volume is now?

Actually, I was scripting a "better" volume keystroke. Once I get this issue resolved with the key, I store the current value to an ini. Should it not exist, I'll set the wave volume to 20%, notify the user (being me) and then operate normally. From that point, the up/down will increase/decrease the volume by 5% each keypress. Only problem is that AutoIt (in addition to windows) doesn't seem to see that key.

Edit:And yea, I was planning on using SoundSetWaveVolume :D. I just have no way to link that (working) part of my script to the volume keys on my keyboard. Sure, I could use different keys, but I don't want to.

Edited by pekster

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

Sure, I could use different keys, but I don't want to.

and why should you? :D that's what that fancy schmancy keyboard of yours is for, isn't it? ;D

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

and why should you?  :D that's what that fancy schmancy keyboard of yours is for, isn't it?  ;D

Hehe, nope. I got it for $2 plus shipping because the Microcenter had them overstocked. It just has a few media keys up top, but it's not fancy at all. My family has a nice $80 wireless keyboard/ mouse combo, but I needed something for my comp.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

I was kidding, 'cause they're coming on more and more keyboards now.


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

I see, heh. I love how this thread is a lot of posting that doesn't solve my problem. I'm almost expecting to hear something about Hitler per Godwin's law :D


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

I'm sorry, but we're going to have to end this thread now, before things get silly. Too bad for your volume keys really.


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

Do the keys not already adjust the volume? It's been my experience that those keys all function correctly out of the box. If they aren't already adjusting the volume, then finding the answer to that problem should be the first step...

Share this post


Link to post
Share on other sites

Yea, I knew that might be the issue, I was just wondering if the other people running XP or 2000 could send that keystroke, and have it work as expected. Short of re-installing XP, I'm not excatally sure what could help it (although this machine could probably use a re-install now anyway; been a couple of months.)


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

I have windows XP and they don't work for me ? but maybe I'm doing it worng.

SEND("VOLUME_DOWN") and then I would load it again and again but nothing would happen .

Share this post


Link to post
Share on other sites

I have windows XP and they don't work for me ? but maybe I'm doing it worng.

SEND("VOLUME_DOWN")  and then I would load it again and again but nothing would happen .

Since they are special characters, you need to use brackets around it. That would turn into:

Send"{VOLUME_DOWN}")

You can also do it 20 times or something, to help make it a more noticable difference. This is best done with the windows volume control open, and run this:

Opt("SendKeyDelay", 100)
Send("{VOLUME_DOWN 20}")

When using the 2nd method, just make sure the volume bar isn't at the bottom so you can see it move it it works.


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

Sorry that didn't work ? I even tried the mute one ?

{VOLUME_MUTE}

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Thanks for your help bobheart. I asked a few online buddies at an IRC network I hang out at, and I had mixed results. A few said it worked, and it failed for a couple of them. All people testing it used XP. Due to the mixed results on the same platform, I'm very tempted to label this problem as a "micro$oft issue."

Edit: "Asked" as in created a script and had them run it that would send the VolumeDown stroke 25 times. Just re-read my post, and realised I left that out.

Edited by pekster

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

It works fine for me. I would expect it's some kind of keyboard driver issue. Do the people who couldn't get it to work have multimedia capable keyboards and do those keys work for them when manually pressed?

Share this post


Link to post
Share on other sites

It works fine for me.  I would expect it's some kind of keyboard driver issue.  Do the people who couldn't get it to work have multimedia capable keyboards and do those keys work for them when manually pressed?

Okay, I had stayed up too late last night, and messed up my example so it wouldn't always run correctally. Here is what actually happends: Sending the {VOLUME_DOWN} and other volume keystrokes worked for all my testees this morning. This makes sense, because even if they have no media keyboard, the send strokes makes it look that key is being pressed down anyway. However, I created a hotkey for the {VOLUME_UP} keystroke on my keyboard, and it worked. Because I now know the key itself works as expected, it's probably a MS issue. Oddly enough, it worked about two months ago on this system before my last reformat.

Potential solution: reformat the stupid OS in hopes that it works. It's not a problem with my code or AutoIt (not that I ever suggested blaming AutoIt :huh2: ) at this point. It's just my OS. :D


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0