BillPeet Posted March 12, 2015 Posted March 12, 2015 Hello, (first post) This question has been asked a thousand times, but I can't get it to work. I'm trying to click a button on a toolbar. Here's the summary of the toolbar: >>>> ToolsBar <<<< 1: 57600 2: 57601 3: 57603 4: 0 5: 32785 6: 0 7: 32771 8: 32772 9: 32781 10: 32788 which seems strange considering that there are 14 buttons on the toolbar??? I have this: #include <GuiToolbar.au3> #include <GuiConstantsEx.au3> local $hWnd = WinWait("PCCut - PCCut1","",10) _GUICtrlToolbar_ClickIndex($hWnd,10,"left",True) ControlClick($hWnd,"","[iD:32788]") but it doesn't work. What am I doing wrong?
JohnOne Posted March 12, 2015 Posted March 12, 2015 Try to do a little better than "it doesn't work". What are the return values, if any of the functions you call. etc... AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
jdelaney Posted March 12, 2015 Posted March 12, 2015 1) The _GuiCtrl* functions needs the handle of the toolbar, not the window 2) The controlclick won't work, because the 'commandid' is not a control I prefer to use: ControlCommand($hwin,"",$hControl,"SendCommandID",32788) IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
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