Sign in to follow this  
Followers 0
Guest Niels

Setting Volume Control Record Source, Suggestions?

1 post in this topic

Greetings,

For a long time I have been looking for a way to "lock" my volume control record source to line-in, and AutoIt seems to have the solution.

The reason I want to do this is mainly because I schedule my TV-card to record programs. Unfortunately a lot of programs mess around with my volume control settings, most notably games and media players, and don't restore them afterwards. So I often end up with recordings without sound.

Now, I've written a small script which waits until my recording program runs and then adjusts the volume control settings:

Run("c:\windows\sndvol32.exe /record","","@SW_HIDE")
  ProcessWait("Sndvol32.exe")
  ControlSend("Record Control","","Button3"," ")
  ControlSend("Record Control","","msctls_trackbar324","[{HOME}")
  ProcessClose("Sndvol32.exe")

It works, but has some annoying habbits. For one thing, it steals the focus away from other programs. Of course, I can use autoit to reurn the focus to the recording program, but I actually want to schedule the script to "repair" the volume settings constantly (or at least once every few seconds) and then I cannot have this focus-stealing behaviour.

Another problem is with the "Button3" and "msctls_trackbar324". The instance of these classes (umm did i formulate that correctly?) depends on which options are configured to be visible in the panel at that time. I don't really plan on changing the configuration, but if I'd remove the CD sound setting from the panel, the line in would become "Button1" and my script wouldn't work anymore.

So does anyone have suggestions to improve the script? They would be much appreciated! Thanks.

p.s. A big thank you to the creators of AutoIt! It's useful and fun at the same time. :D

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