swfToolbar buttons – how to press/click
New DiscussionHello,
I need some guidance on how to click a button on a tool bar. I can pull the button names but I am having a hard time with how to actually click a button. Some advice would be great.
Here is what I have working:
strToolName = SwfWindow(“PRISM G2”).SwfToolbar(“_ProjectManagerWindow_Toolbars”).GetNAProperty (“Ribbon.Tabs[2].Groups[0].Tools[0]”)
print strToolName
result = ‘ = [Cost Control Accounts] – ButtonTool
Cost Control Accounts is a button I would like to push to open another form.
Here are 3 different attemps:
SwfWindow(“PRISM G2”).SwfToolbar(“_ProjectManagerWindow_Toolbars”).ClickToolbarTool “_ProjectManagerWindow_Toolbars”, “Cost Control Accounts”
‘SwfWindow(“PRISM G2”).SwfToolbar(“_ProjectManagerWindow_Toolbars”).Press “_ProjectManagerWindow_Toolbars”, “Cost Control Accounts”
SwfWindow(“PRISM G2”).SwfToolbar(“_ProjectManagerWindow_Toolbars”).Press (“Ribbon.Tabs[2].Groups[0].Tools[0]”)
Error from the last:
‘Cannot identify the specified item of the _ProjectManagerWindow_Toolbars object. Confirm that the specified item is included in the object’s item collection.
‘
‘Line (87): “SwfWindow(“PRISM G2”).SwfToolbar(“_ProjectManagerWindow_Toolbars”).Press (“Ribbon.Tabs[2].Groups[0].Tools[0]”)”.
Any help would be greatly appreciated.