Buffo Posted November 18, 2005 Share Posted November 18, 2005 Hi, This code will not hide the application window. Why? Run("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,1", "", @SW_HIDE) If it helps: OS: WinXP Pro SP2 AutoIt3: v3.1.1.87beta Regards, Buffo Link to comment Share on other sites More sharing options...
herewasplato Posted November 18, 2005 Share Posted November 18, 2005 (edited) Hi, This code will not hide the application window. Why? Run("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,1", "", @SW_HIDE) If it helps: OS: WinXP Pro SP2 AutoIt3: v3.1.1.87beta Regards, Buffoadd WinSetState("System Properties","",@SW_HIDE) right after that run line... As to why the one run line does not hide the window - well, it did... it hid rundll32.exe Rundll32.exe used shell32.dll to start the system control panel applet... so the AutoIt "Run" function did not start the applet and it did not hide it. - I think. Edit1: I know that Rundll32.exe does not show a window - so there is nothing to hide... but AutoIt tried. Right? Edit2: I think that you can change most of these settings in the registry. Edited November 18, 2005 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Buffo Posted November 18, 2005 Author Share Posted November 18, 2005 WinSetState("System Properties","",@SW_HIDE) That's I am wondering about. For me it's impossible to hide this window. Even if I try Run("control sysdm.cpl", "", @SW_HIDE) the window will not be hidden. I don't understand this. Maybe a bug? Btw: I tried it with the latest stable Autoit-Version, too. Regards, Buffo Link to comment Share on other sites More sharing options...
herewasplato Posted November 18, 2005 Share Posted November 18, 2005 That's I am wondering about. For me it's impossible to hide this window. Even if I try Run("control sysdm.cpl", "", @SW_HIDE) the window will not be hidden. I don't understand this. Maybe a bug? Btw: I tried it with the latest stable Autoit-Version, too. Regards, BuffoAutoIt is hiding control.exe Run("control") will make it show I tested RunWait("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,1", "", @SW_HIDE) WinSetState("System Properties","",@SW_HIDE) and it worked for me - I had to do a WinSetState("System Properties","",@SW_SHOW) to get the window to show and kill it... I rarely post untested code - but now it does not hide the window... I do not know what to suggest next other than edit the registry directly. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
MHz Posted November 18, 2005 Share Posted November 18, 2005 I tested RunWait("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,1", "", @SW_HIDE) WinSetState("System Properties","",@SW_HIDE) and it worked for me - I had to do a WinSetState("System Properties","",@SW_SHOW) to get the window to show and kill it... I rarely post untested code - but now it does not hide the window...A RunWait test works at hiding the window? This makes it hide when the window appears. Run("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,1") WinWait("System Properties") WinSetState("System Properties","",@SW_HIDE) Link to comment Share on other sites More sharing options...
Buffo Posted November 18, 2005 Author Share Posted November 18, 2005 Thx for your help :-) My fault was to forget the line: WinWait("System Properties") Now, it's running... But the window will still appear for a short time. Isn't it possible to start the dialog completely hidden? It's only an aesthetic thing but for me it's important ;-) Regards, Buffo Link to comment Share on other sites More sharing options...
MHz Posted November 18, 2005 Share Posted November 18, 2005 Opt('WinWaitDelay', 10) should make it hard to see the initial window.Opt('WinWaitDelay', 10) Run("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,1") WinWait("System Properties") WinSetState("System Properties","",@SW_HIDE) Opt('WinWaitDelay', 250) notime 1 Link to comment Share on other sites More sharing options...
Buffo Posted November 18, 2005 Author Share Posted November 18, 2005 Yes, that's it. Works great. Thx a lot :-) Regards, Buffo Link to comment Share on other sites More sharing options...
herewasplato Posted November 18, 2005 Share Posted November 18, 2005 A RunWait test works at hiding the window?It was an unintentional copy/paste of one of the many things that I tried.The RunWait was to let me look at taskmanager.I do not know why I did not think of the WinWait...Ill blame it on trying to post to too many threads......too many threads in the head. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
MHz Posted November 18, 2005 Share Posted November 18, 2005 No problem, just relax about it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now