Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Completely hide control panel?

$
0
0
Hi,

I'm trying to find a way to quickly switch between stereo output and quadraphonic output.

At first, I tried to achieve this by directly changing the registry: I used Process Monitor to detect which registry keys were accessed when changing the output setting. I then copied the keys that were actually changed to a .reg file and run that to change the output. This almost worked, but for some reason applications had to be restarted to allow them to reload the settings. When I switched the output normally, the output switch occured immediately. I could clearly see this in Process Monitor: When doing it manually, applications like Winamp accessed the changed keys. When using the reg files, they did not. Maybe this problem can be solved, but I have no idea how...

Then I decided to give AutoIt a try. I created this script:


Opt('WinWaitDelay', 90)
Run("control mmsys.cpl")
WinWait("[CLASS:#32770]")
WinSetState("[CLASS:#32770]","",@SW_HIDE)
ControlListView("[CLASS:#32770]", "", 1000, "Select", 2)
ControlClick("[CLASS:#32770]", "", 1001)
WinWait("[CLASS:NativeHWNDHost]")
WinSetState("[CLASS:NativeHWNDHost]","",@SW_HIDE)
ControlCommand("[CLASS:NativeHWNDHost]", "", 1303, "SetCurrentSelection", 1)
ControlClick("[CLASS:NativeHWNDHost]", "", "Button1")
ControlClick("[CLASS:NativeHWNDHost]", "", "Button1")
ControlClick("[CLASS:NativeHWNDHost]", "", "Button2")
ControlClick("[CLASS:#32770]", "", 1)

This basically works, but the one problem I experience with this, is that the @SW_HIDE argument in the Run function doesn't seem to work for the control panel - so it cannot be hidden. I've also created a script for the seperate Realtek application, but that window couldn't be hidden either.

Is there any to completely hide the control panel/Realtek window, or is there a better solution to my problem?

Thanks in advance!

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>