SetCheckBox doesnt really set the checkbox

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Djek
Pro Scripter
Posts: 148
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

SetCheckBox doesnt really set the checkbox

Post by Djek » Fri Dec 26, 2008 11:32 am

hey there,
using 11.0.33

I find it strange that the checkbox for "Alles dempen"(=Mute all) will be checked by the following script, but it isnt really if you reactivate the volume.

Code: Select all

run>sndvol32
wait>0.5
SetFocus>Volume*
Let>WIN_USEHANDLE=0
SetCheckBox>Volumeregeling,&Alles dempen,TRUE
I tried it on an other win XP pc but it is just if the setting cant be remembered, everytime I reactivate sndvol32 the checkbox is cleared.
If I use my mouse click to select it, it works fine.
Is this a kind of bug?

Thanks,
Djek

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Fri Dec 26, 2008 3:45 pm

I confirm what you are seeing, but is it really a checkbox? In View System Windows it looks like a button, and if you "push" that button it does stick after the window is closed. But for that to work predictably you need to know the current mute status and GetCheckBox works for that. So, back to the original question, is it really a checkbox?

Working (XP) mute script:

Code: Select all

run>sndvol32
wait>0.5
SetFocus>Master Volume*
Let>WIN_USEHANDLE=0
GetCheckBox>Master Volume,&Mute all,res
//MDL>res
If>res=0,Mute,Finish
Label>Mute
PushButton>Master Volume,&Mute all
Label>Finish
Wait>1
CloseWindow>Master Volume

User avatar
Djek
Pro Scripter
Posts: 148
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

Post by Djek » Fri Dec 26, 2008 7:22 pm

wel, youre right!
I didnt notice that it was a button, I did look at View System Windows, but for some reason it didnt rinkle the (xmas)-bell...
Thanks for helping me out,
I translated your script to dutch, and it works like a charm.
kind regards
Djek

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts