More window pain

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
0894761f

More window pain

Post by 0894761f » Wed Nov 27, 2002 7:02 am

I'm trying to get MS to check or uncheck the line in box on the Volume Control window (Win98). I'm trying to follow the help instuctions closely, but no luck.
Is it the window names I've entered?
Thanks

From "System Windows"
1952 - Static "Volume Control"
2096 - Static "Line-In"
3840 - Static "Balance:"
2900 - Static "Volume:"
3916 - Button "&Select"
3852 - Button "&Advanced"

Windowspy does not seem to have much info on this window.

ExecuteFile>C:\WINDOWS\SNDVOL32.EXE
GetCheckBox>Volume Control,Line-In,&Select,res
If>res=1,checked,unchecked

Label>checked
SetCheckBox>Volume Control,Line-In,&Select,FALSE
Goto>end

Label>unchecked
SetCheckBox>Volume Control,Line-In,&Select,TRUE

Label>end
Wait>2
CloseWindow>Volume Control

Ernest

Post by Ernest » Wed Nov 27, 2002 7:57 am

Hi,
1. maybe it's a timing issue: Wait> before GetCheckBox>
2. check the window title: GetActiveWindow>window_title,X,Y
3. maybe the window lost the focus
4. check the result variable res: MessageModal>%res%

Ciao
Ernest

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Nov 27, 2002 8:18 am

Hi,

Two problems with your script:

1. Nothing to wait until sndvol32.exe is ready before proceeding. After the ExecuteFile do WaitWindowOpen>Volume Control

2. Your GetCheckBox and SetCheckBox have 4 parameters, but these commands only take 3 - window title, checkbox caption and result/setting.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

0894761f

checked box-no action

Post by 0894761f » Thu Nov 28, 2002 6:25 am

Thanks for your quick responses guys. I now can get this scp to check the box quite nicely, but it seems like it only "looks" checked and when I step thru it, if I double click on the already selected box, it then becomes really selected...and I hear sound.
Also, after the macro runs and closes the window, the check box is not checked when I open the window up again with the mouse.
Any ideas?
Thanks,
Pat

ExecuteFile>C:\WINDOWS\SNDVOL32.EXE
WaitWindowOpen>Volume Control
GetCheckBox>Volume Control,Line-In,res
If>res=1,checked,unchecked
Wait>5
Label>checked
SetCheckBox>Volume Control,&Select,FALSE
Wait>5
Goto>end

Label>unchecked
SetCheckBox>Volume Control,&Select,TRUE
Wait>5
Label>end
Wait>5
CloseWindow>Volume Control

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