Stilez Posted July 30, 2011 Posted July 30, 2011 (edited) Hi,I'm trying to automate adding a folder as a toolbar in Windows 7. That's easy and works well. The problem is the "folder chooser" dialog box is a bit ugly and its automation is crude to watch. I'd like to conceal that, maybe by suppressing redraw for that process or window or something while it's active. I also have the dialog class as "[CLASS:MSTaskListWClass; TEXT:Running applications]" but not sure whether that's useful somehow.Any help with this would be great. It's part of an enhancement for some code on MSFN so I'd like to do it nicely. Any other improvements welcomed. Opt("WinDetectHiddenText", 0) Opt("WinTextMatchMode",2) OnAutoItExitRegister("CleanExit") BlockInput(1) ; Add new toolbar MouseClick("right", 0, @DesktopHeight) Send("{DOWN}{RIGHT}{UP}{ENTER}") $e = WinActive("New Toolbar - Choose a folder") If $e == 0 Then Msgbox(17,"Error","Expected dialog didn't open") Exit EndIf sleep(1000) ControlSetText("New Toolbar - Choose a folder", "", "Edit1", "C:\My Toolbar") sleep(1000) ControlClick("New Toolbar - Choose a folder", "", "Button1") ; Continue with other stuff ... Func CleanExit() BlockInput(0) EndFunc Edited July 30, 2011 by Stilez
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