Sign in to follow this  
Followers 0
BillPeet

Click toolbar button

3 posts in this topic

Hello, (first post)  :bye:

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?

 

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0