Jump to content

Can someone tell me how to access this toolbar item?


det54
 Share

Recommended Posts

Hi all,

I am very new to AutoIt (day two), and am having trouble figuring out how to access a toolbar button. Here is the Window Info:

>>>> Window <<<<
Title:    SolidWorks Premium 2012 x64 Edition - [PS High 9env SW2012 - 120907.SLDPRT *]
Class:    Afx:0000000140000000:8:0000000000010005:0000000000000000:0000000009060387
Position:    0, 0
Size:    1440, 860
Style:    0x150B8000
ExStyle:    0x00000000
Handle:    0x0000000000010682

>>>> Control <<<<
Class:    ToolbarWindow32
Instance:    7
ClassnameNN:    ToolbarWindow327
Name:    
Advanced (Class):    [CLASS:ToolbarWindow32; INSTANCE:7]
ID:    59392
Text:    
Position:    1, 642
Size:    1438, 24
ControlClick Coords:    412, 15
Style:    0x5600084E
ExStyle:    0x00000000
Handle:    0x0000000000190CF4

>>>> Mouse <<<<
Position:    413, 657
Cursor ID:    0
Color:    0xF0F0F0

>>>> StatusBar <<<<
1:    SolidWorks Premium 2012 x64 Edition
2:    
3:    
4:    
5:    Editing Part
6:    
7:    
8:    
9:    
10:    

>>>> ToolsBar <<<<
1:    59    
2:    60    
3:    0    
4:    58    
5:    44    
6:    45    

>>>> Visible Text <<<<
swCmdMgr
swCaption
swMenu
SearchBox
SearchBox
Auto Hider
Task Pane Tabs Wnd
EM Frame
header
expandCollapse
pin
swInnerFrame
PS High 9env SW2012 - 120907.SLDPRT *
Tree Container Wnd
uiTreeCtrlView_c
FeatureFilter
uiVisualSketchEditorView_c
Dve sheet
Surface Parameters
dvePage ScrollView
e:\Temp\NIK579E.tmp
More Parameters...
Show
Export to Excel
Selection
Parameters
Time History
Options
SolidWorks Premium 2012 x64 Edition
Standard
Formatting
Features
Task Pane


>>>> Hidden Text <<<<
swTags
Tags:
pUppIntFrame
inner HTML view
swInnerFrame
...
Import Annotations
Design Annotations
DimXpert Annotations
Include items from hidden features
Auto-start projected view
Options
swInnerFrame
PNGBUTTON
uiVisualSketchEditorView_c
Dve sheet
Properties
dvePage ScrollView
Select an entity to view or to modify its properties.
Message
uiConfigMgrView_c
uiSwiftTreeCtrlView_c
uiDisplayManagerView_c
uiFeatureMgrActiveXView_c
uiTreeCtrlView_c
FeatureFilter
PNGBUTTON
Dve sheet
Properties
dvePage ScrollView
Select an entity to view or to modify its properties.
Message
e:\Temp\NIK57B1.tmp
Surface Parameters.xlt
e:\Temp\NIKDF70.tmp
Message
uiConfigMgrView_c
uiSwiftTreeCtrlView_c
uiDisplayManagerView_c
uiFeatureMgrActiveXView_c
MotionToolbar
AnimationTree
AnimControllerView
CAnimTaskManagerView
AnimGanttView
Flow Simulation Display
Flow Simulation Results Features
Flow Simulation Results
Flow Simulation Features
Flow Simulation Main
Fastening Feature
Screen Capture
SolidWorks Office
Display States
<Default>_Display State 1
Tools
Standard Views
Web
http://www.solidworks.com
Macro
View
Standard
Quick Snaps
Selection Filter
Line Format
Layer
Formatting
Blocks
Reference Geometry
DimXpert
Table
Weldments
CommandManager
Explode Sketch
2D to 3D
Align
Curves
Surfaces
Sheet Metal
Mold Tools
Features
Annotation
Drawing
Assembly
Layout Tools
Task Pane
Spline Tools
Render Tools
Dimensions/Relations
Sketch
uiWindowHeapHelper_c

What I want to access is item 6 under the "Toolsbar" heading: button 45. I have been trying for the last hour or so to get ControlClick to work with this, but have not stumbled on the correct parameters to pass. The following works for the "Show" button:

ControlClick("SolidWorks Premium 2012 x64 Edition - [PS High 9env SW2012 - 120907.SLDPRT *]","swCaption","Button21")

I tried similar code for the toolbar button with various values for controlID and button with no luck.

Worst case, I will use a ClickMouse command, but it seems less elegant :)

Thanks,

Dan

Link to comment
Share on other sites

  • Moderators

Try something like this:

ControlClick("SolidWorks Premium", "", "[CLASS:Button; INSTANCE:45]"

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Look into the 'Toolbar' info tab that you've pasted...you need to send that commandid through

ControlCommand ( $hwin, "", $yourcontrol, 'sendcommandid', $yourcommandidtosend)

you may want to focus on the toolbar, first.

helpfile:

"SendCommandID", Command ID Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID.

Edited by jdelaney
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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...