Rudex Posted December 4, 2016 Share Posted December 4, 2016 Hi, I want to remove the taskbar from one external program that i am automating with autoit. I have the problem that when I execute the program with command Run, appear 2 previous windows before to the main program window. In these two windows I need to accept and push ok. When I use the code below at the first window it works fine. But when appear the second appear again the taskbar program icon. And when click again, appear again until the main window appear and then i can remove it. again. #include <GuiToolBar.au3> ; Run Software with the window normal. Run("C:\MYPROGRAM.exe", "", @SW_SHOWNORMAL) WinWaitActive("[CLASS:TFormActivation]", "", 10) ;Sleep(2000) $hParent = WinGetHandle("[Class:Shell_TrayWnd]") $hToolBar = ControlGetHandle($hParent, "", "ToolbarWindow322") $ButtonText = "MY PROGRAM NAME" ; Taskbar title $count = _GUICtrlToolbar_ButtonCount($hToolBar) ;_GUICtrlToolbar_SetButtonState($hToolBar, 6, $TBSTATE_HIDDEN) For $i = 1 To $count - 1 Step 2 $ID = _GUICtrlToolbar_IndexToCommand($hToolBar, $i) If StringInStr(_GUICtrlToolbar_GetButtonText($hToolBar, $ID), $ButtonText) Then _GUICtrlToolbar_SetButtonState($hToolBar, $ID, $TBSTATE_HIDDEN) ExitLoop EndIf Next Any way to to this code with one loop until after appear the main program window?. For loop or similar to while the code of script is executing the loop will check constantelly if the window appear again... And another thing. Are there any way to hide completely the window?. It appears around 1 second and later hide it. I would like the window no appear any time. is not it possible with autoit?. Regards. Link to comment Share on other sites More sharing options...
Rudex Posted December 5, 2016 Author Share Posted December 5, 2016 any help?. Thanks 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