Sathya Posted March 20, 2009 Share Posted March 20, 2009 Hi, I'm not able to click a button in a tool bar using "_GUICtrlToolbar_clickbutton" function. For example, if i open a folder, we will have toolbar with back, forward, up etc. button, how to click those buttons??? can any one help me in solving this??? Thanks, Sathya Link to comment Share on other sites More sharing options...
Authenticity Posted March 20, 2009 Share Posted March 20, 2009 #include <GuiToolBar.au3> Run('Explorer.exe') WinWaitActive('[CLASS:ExploreWClass]') Sleep(500) Dim $hWnd = WinGetHandle('[CLASS:ExploreWClass]') Dim $hToolBar = ControlGetHandle($hWnd, '', '[CLASS:ToolbarWindow32; INSTANCE:2]') ConsoleWrite($hWnd & @TAB & $hToolBar & @LF) _GUICtrlToolbar_ClickIndex($hToolBar, 2) Link to comment Share on other sites More sharing options...
TerarinK Posted March 21, 2009 Share Posted March 21, 2009 _GUICtrlToolbar_ClickButton is for when you know the name of the object. Using Authenticity's ClickIndex is the best way to accomplish what you want done. Just to note, you can check the res file for the name on the exe if it is in there, almost everything below 32 bit has it 32 bits are kinda funny in a way 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
Authenticity Posted March 21, 2009 Share Posted March 21, 2009 Just to note, a separator is considered button as well and is deserve an index place as well. Link to comment Share on other sites More sharing options...
Sathya Posted March 21, 2009 Author Share Posted March 21, 2009 (edited) Thanks . it works... Edited March 21, 2009 by Sathya 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