Sign in to follow this  
Followers 0
januismer

How To Test For A Checked Box?

14 posts in this topic

I'm trying to set microphone properties within C:\WINDOWS\system32\sndvol32.exe.

The problem I have is that some of my computers already have it setup correctly. I'd like to test whether the microphone is being muted or not. Can anyone think of a way to do that?

Thanks!

Share this post


Link to post
Share on other sites



ControlCommand() and IsChecked command

Thanks!

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

wow sorry, i havent see the first post :) ..

Edited by mistakilla

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Share this post


Link to post
Share on other sites

ControlCommand() and IsChecked command

OK! I got this far with my script. Can't seem to get it just right. Can you help me?

if ControlCommand ( "Volume Control", "Volume", "[TEXT:&Mute], "IsChecked", ) then

MsgBox(4096, "mute check", "Master Volume is muted", 10)

Else

MsgBox(4096, "mute check", "Master Volume is NOT muted", 10)

endif

I get a syntax error on the 1st line...

post-97-12596215844142_thumb.jpg

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

OK! I got this far with my script. Can't seem to get it just right. Can you help me?

if ControlCommand ( "Volume Control", "Volume", "[TEXT:&Mute], "IsChecked", ) then

MsgBox(4096, "mute check", "Master Volume is muted", 10)

Else

MsgBox(4096, "mute check", "Master Volume is NOT muted", 10)

endif

I get a syntax error on the 1st line...

try replacing the first line with this:

if ControlCommand ( "Volume Control", "Volume", "[TEXT:&Mute]", "IsChecked" ) then

...just removed the last comma, and added a "

Edited by andybiochem

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!

Share this post


Link to post
Share on other sites

try replacing the first line with this:

if ControlCommand ( "Volume Control", "Volume", "[TEXT:&Mute]", "IsChecked" ) then

...just removed the last comma, and added a "

that didn't help still getting syntax error on the 1st line after removing the comma...

Share this post


Link to post
Share on other sites

that didn't help still getting syntax error on the 1st line after removing the comma...

did you add the " as well..... I edited my post within a minute or so of making it


- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!

Share this post


Link to post
Share on other sites

Yes that was the problem. I thought I was going nuts since I copied the command line from your post and pasted it - before you edited it...

Now with the quote it works just fine... Thanks a ton!

Share this post


Link to post
Share on other sites

Yes that was the problem. I thought I was going nuts since I copied the command line from your post and pasted it - before you edited it...

Now with the quote it works just fine... Thanks a ton!

Oh! Oh! the first line does not get a syntax error, but the script displays the same message no matter if the volume is muted or not..

I did make a slight change, but it did not help...

if ControlCommand ( "Volume Control", "Volume", "[TEXT:&Mute]", "IsChecked" ) = 1 then

added the = 1

The msg is NOT muted no matter what...

Share this post


Link to post
Share on other sites

Oh! Oh!  the first line does not get a syntax error,  but the script displays the same message no matter if the volume is muted or not..

I did make a slight change, but it did not help...

if ControlCommand ( "Volume Control", "Volume", "[TEXT:&Mute]", "IsChecked" ) = 1 then

added the = 1

The msg is NOT muted   no matter what...

You have wrong ClassNameNN for checkbox control.

Run Au3Info move cursor above checkbox and look at Control Tab at value for ClassNameNN.

Then use it this way:

if ControlCommand ( "Volume Control", "Volume", "ClassNameNN", "IsChecked" ) = 1 then

Share this post


Link to post
Share on other sites

You have wrong ClassNameNN for checkbox control.

Run Au3Info move cursor above checkbox and look at Control Tab at value for ClassNameNN.

Then use it this way:

Thanks for idea, but

That does not work, this does:

if ControlCommand('[CLASS:Volume Control]', '', 1000, 'isChecked') then

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