Sign in to follow this  
Followers 0
muchado

Can AfxFrameOrView100 Be Controlled?

8 posts in this topic

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.

post-65681-0-71096100-1386326428_thumb.p

Share this post


Link to post
Share on other sites



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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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...

post-65681-0-34578100-1386326874_thumb.p

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Does the AdSec product provide some kind of API to do what you want?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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...

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