muchado Posted December 6, 2013 Posted December 6, 2013 I want to control a program that uses AfxFrameOrView100 objects to display a range of graphics. I was wondering if there is any way to unpack that to access the individual elements. I can't find very much about this kind of object. Ideally I would like to copy and paste to and from the spreadsheet cells. I would also like to be able to access the right-click menu, but that is another topic. I have attached a screenshot.
water Posted December 6, 2013 Posted December 6, 2013 Welcome to AutoIt and the forum! As the Window Info Tools shows the ID and Classname of the control it should be possible to control it using Control* functions. It might be a bit harder to copy / paste from/to individal cells. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
muchado Posted December 6, 2013 Author Posted December 6, 2013 I forgot to mention that these objects are floating in an MDI Client (the grey stuff). Don't know if that makes any difference. Let me know if more information would be helpful...
muchado Posted December 6, 2013 Author Posted December 6, 2013 Welcome to AutoIt and the forum! As the Window Info Tools shows the ID and Classname of the control it should be possible to control it using Control* functions. It might be a bit harder to copy / paste from/to individal cells. Hi - thanks for the quick response. I can control the frame and I can click on things by using ControlClick and a location, but I would ideally like to <select all> then <copy>, then process the cells in a spreadsheet or similar and then <select all> and <paste> to replace everything. I can sort of do that (using keystrokes), but it is not well controlled. The main problem is that it is difficult to know when it is ready for me to move on. Any ideas?
Solution water Posted December 6, 2013 Solution Posted December 6, 2013 You need to identify the Window plus the Control you want to automate. Tab "Summary" gives you this information. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
water Posted December 6, 2013 Posted December 6, 2013 Does the AdSec product provide some kind of API to do what you want? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
muchado Posted December 6, 2013 Author Posted December 6, 2013 You need to identify the Window plus the Control you want to automate. Tab "Summary" gives you this information. I have identified the window - it is a strange Afx...... class, and the control is the AfxFrameOrView100 instance 1, which provides no more that that. I will try again and see if I have missed something. Thank you for your help. Summary Tab below... >>>> Window <<<< Title: Oasys Adsec - AdSecTestSection06.adtxt Class: Afx:011C0000:8:00010003:00000000:1611090D Position: 26, 205 Size: 687, 772 Style: 0x14CF8000 ExStyle: 0x00000110 Handle: 0x006102C6 >>>> Control <<<< Class: AfxFrameOrView100 Instance: 1 ClassnameNN: AfxFrameOrView1001 Name: Advanced (Class): [CLASS:AfxFrameOrView100; INSTANCE:1] ID: 59648 Text: Position: 183, 253 Size: 297, 296 ControlClick Coords: 82, 102 Style: 0x50000000 ExStyle: 0x00000000 Handle: 0x00290372 >>>> Mouse <<<< Position: 299, 610 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< 1: Define the loads (or strains) applied to the section (or component) >>>> ToolsBar <<<< >>>> Visible Text <<<< AdSecTestSection06.adtxt : Loads Define the loads (or strains) applied to the section (or component) AdSecTestSection06.adtxt : Current Section Cases Toolbar Cases Toolbar Analysis Case Ready Standard SLS Analysis ULS Analysis Compound Section Current section 1 : TestSection1 Data AdSec Standard Object Viewer Object Viewer Gateway AdSecTestSection06.adtxt : Gateway Graphics Graphics >>>> Hidden Text <<<< 1
muchado Posted December 6, 2013 Author Posted December 6, 2013 Does the AdSec product provide some kind of API to do what you want? Unfortunately not. I have been pressing them for one for a number of years. I understand that they will implement one for this program some time in the next year. However, they also write other programs that we also use, and which they are not currently planning to add an API for. AutoIT seems our best bet for now for automation...
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