
muchado
Members-
Posts
18 -
Joined
-
Last visited
Everything posted by muchado
-
IUIAutomation MS framework automate chrome, FF, IE, ....
muchado replied to junkew's topic in AutoIt Example Scripts
This looks as though it is really good. However, I have a couple of questions, which are delaying my start: 1. When SimpleSpy calls UIAWrappers, there is an error for the following variable ($STR_REGEXPMATCH). Where should that variable be set and where? 2. Should I extract each zip file into a separate folders? Should these folders be named and located anywhere specific? How will the functions in them be accessible from other scripts? -
Thanks! Thanks for the additional information and for the relative value of MSAA and UI Automation. That is very helpful. It is strange that I didn't find that posting. My searching skills are generally quite good and I thought I had put some of those terms in my Google Search. I found plenty that was written by junkew and spent quite a lot of time reading his posts as well as those by others.
- 3 replies
-
- UI Automation
- Inspect.exe
-
(and 1 more)
Tagged with:
-
I have found AutoIT to be very useful in automating some of the older programs that we use, but I am now trying to work out how to automate newer programs that use the Windows Forms - such as WindowsForms10.Window.8.app.0.2bf8098_r13_ad1 I have read through the manual, but do not find anything on this there. I have also done some reading on the forum and have found material that looks useful, but I am not familiar with this and some of the threads look a little old. Please could someone update me on what the latest status is on this? Are there any plans to provide wrappers to the UI Automation controls, similar to those already provided for ListView, ComboBox, etc? How would I go about making a menu selection with such a system? If people are not using AutoIT for this kind of automation, then what are they using instead? Similar threads: '?do=embed' frameborder='0' data-embedContent>> - 2011 '?do=embed' frameborder='0' data-embedContent>> - 2008 '?do=embed' frameborder='0' data-embedContent>> - 2012 Other questions if you have time... What is the difference between MSAA mode and UI Automation? If I am using "Inspect.exe", how do I identify what information that I need to send a command to the control? Sorry - lots of questions - I am very much finding my way around this.
- 3 replies
-
- UI Automation
- Inspect.exe
-
(and 1 more)
Tagged with:
-
I have written a script that I want to use to call a DLL. However, when I call it using DLLOpen, it returns an integer rather than a handle. This would make sense if it was a "-1" error code, but instead it is a "1". If FileExists ( @SystemDir & "\MyDLL.dll" ) Then ConsoleWrite ( "DLL exists and is located here: " & @SystemDir & @CRLF ) Else ConsoleWrite ( "DLL not found in " & @SystemDir & @CRLF ) Exit EndIf Global $hDll = DllOpen(@SystemDir & "\MyDLL.dll") ConsoleWrite ( "DLLOpen MyDLL returns " & $hDLL & @CRLF ) If $hDll = -1 Then Exit MsgBox(0, "", "Failed to open MyDLL.dll") Global $aDLL = DllCall($hDLL, "BOOL", "Output", "str", "AdSec_Driver", "str", "ETABS" ) ConsoleWrite("!" & @error & "-" & @extended & @CRLF) ConsoleWrite ( "MyDLL returns data of type " & VarGetType( $aDLL) & @CRLF ) _ArrayDisplay($aDLL) MsgBox(0, "", $aDLL[0]) DllClose($hDll) When I run this I get the following output on the console: DLL exists and is located here: C:\Windows\system32 DLLOpen MyDLL returns 1 !3-0 MyDLL returns data of type Int32 "C:\Users\andrew.mole\Documents\autoit\AdSec_Driver\trunk\AdSec_Driver.au3" (197) : ==> Subscript used on non-accessible variable.: MsgBox(0, "", $aDLL[0]) MsgBox(0, "", $aDLL^ ERROR Any idea why this is?
-
Here is the script that I am using: If FileExists ( @SystemDir & "\MyDLL.dll" ) Then ConsoleWrite ( "DLL exists and is located here: " & @SystemDir & @CRLF ) Else ConsoleWrite ( "DLL not found in " & @SystemDir & @CRLF ) Exit EndIf Global $hDll = DllOpen(@SystemDir & "\MyDLL.dll") ConsoleWrite ( "DLLOpen MyDLL returns " & $hDLL & @CRLF ) If $hDll = -1 Then Exit MsgBox(0, "", "Failed to open MyDLL.dll") Global $aDLL = DllCall($hDLL, "BOOL", "Output", "str", "AdSec_Driver", "str", "ETABS" ) ConsoleWrite("!" & @error & "-" & @extended & @CRLF) ConsoleWrite ( "MyDLL returns data of type " & VarGetType( $aDLL) & @CRLF ) _ArrayDisplay($aDLL) MsgBox(0, "", $aDLL[0]) DllClose($hDll) I am getting the following result: DLL exists and is located here: C:\Windows\system32 DLLOpen MyDLL returns 1 !3-0 MyDLL returns data of type Int32 "C:\Users\andrew.mole\Documents\autoit\AdSec_Driver\trunk\AdSec_Driver.au3" (197) : ==> Subscript used on non-accessible variable.: MsgBox(0, "", $aDLL[0]) MsgBox(0, "", $aDLL^ ERROR It seems that DLLOpen is not returning an error, but is returning an unexpected handle... Any pointers on what I am doing wrong? Also - if I can get this to work, will it end up being wrapped in the executable if I compile it?
-
I have read all the way through the following forum entry, but I cannot work out how to use it in my case. '?do=embed' frameborder='0' data-embedContent>> Please could someone explain to me how I can include a DLL in a compiled script - I would like to have a single executable that includes everything. It seems from reading through the previous postings that some of the solutions presented are now superseded (such as MemoryDLL). Do I still need to convert my DLL into a HEX format? Does MemoryDLLGen still exist (it is not in the Help file)? If I use DLLCall in my script, will the comopiler package the DLL up inside the executable? The DLL was created using .NET Does the DLL need any special library to be included in it? Sorry if these questions are a little incoherent - I have pretty much got familiar with basic functions in AutoIT (which is a great help, by the way), but I am getting stuck here due to lack of experience.
-
I have identified problems with ControlTreeView when using the x64 executable that aren't there with the default (presumably x86) executable (both v3.3.10.2 on Win7). I am trying to set options in a TreeView in a structural analysis program. I have managed to get the handles for the window and for the TreeView and I have used those to expand and then select one of the options. This works fine with the default executable (incidentally the one that is called by SCiTE) However, I find that when I run this under the x64 executable, it fails to expand or check the tree, although it does manage to give a correct response to "IsChecked". $hOutputSpecDialog = WinWait("Output Specification") $hTreeView = ControlGetHandle ( $hOutputSpecDialog, "", "[CLASS:SysTreeView32; INSTANCE:1]" ) ControlTreeView( $hOutputSpecDialog, "", $hTreeView, "Expand", "General Results") ControlTreeView( $hOutputSpecDialog, "", $hTreeView, "Check", "General Results") $iIsItemChecked = ControlTreeView ( $hOutputSpecDialog, "", $hTreeView, "IsChecked", "#3" ) x86: Line 1042 ULSL: TreeView handle is: 0x00382878 x64: Line 1042 ULSL: TreeView handle is: 0x0000000000372C30 NB. The fact that the the handles are different are because these are two different analysis runs. Having got this far with my posting, I wonder whether it should actually be a bug report. If not, am I doing something wrong? Do I need to set some flag when calling AutoIT3_x64? If it is likely to be a bug, then where do I go to log it? Thanks.
-
Array.au3 ==> Unable to parse line
muchado replied to muchado's topic in AutoIt General Help and Support
Hmmm... strange. I uninstalled and re-installed and the problem went away. Curious and curiouser... PS Is the version number is in the output that I expanded - i.e.: "Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe " I have reinstalled (this time with the 64-bit version), so I can't go back and check. However, as I run scripts now, I get: "Running:(3.3.10.2):C:Program Files (x86)AutoIt3autoit3_x64.exe" -
I have installed the latest versions of AutoIT (3.3.10.2) and SciTE4AutoIT3 (14.1.22.21) and have also replaced the AutoIT3Wrapper.exe (3.3.10.2). In general there are some definite improvements over what I was using before (thanks to all). However, there is a significant problem that I am finding with reference to Array.au3. Any idea why this should be? How can I get rid of the problem? This was not a problem on the previous installation. >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:UsersmuchadoDocumentsautoitAdSec_DrivertrunkAdSec_Driver.au3" /UserParams +>12:19:27 Starting AutoIt3Wrapper v.2.1.4.5 SciTE v.3.3.7.0 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409) >Running AU3Check (3.3.10.2) from:C:Program Files (x86)AutoIt3 input:C:UsersmuchadoDocumentsautoitAdSec_DrivertrunkAdSec_Driver.au3 +>12:19:28 AU3Check ended.rc:0 >Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe "C:UsersmuchadoDocumentsautoitAdSec_DrivertrunkAdSec_Driver.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop C:Program Files (x86)AutoIt3IncludeArray.au3 (1472) : ==> Unable to parse line.: Local $vElement = 0, $iDim_1 = UBound($avArray, 1), $iDim_2 = UBound($avArray, 2), $iDim_Max = ($iDim_1 > $iDim_2) ? $iDim_1 : $iDim_2 Local $vElement = 0, $iDim_1 = UBound($avArray, 1), $iDim_2 = UBound($avArray, 2), $iDim_Max = ($iDim_1 > $iDim_2) ^ ERROR ->12:19:28 AutoIt3.exe ended.rc:1 +>12:19:28 AutoIt3Wrapper Finished.. >Exit code: 1 Time: 0.640 *** EDIT: Problem went away when I reinstalled AutoIT. Probably a problem when I installed somehow. In any case I installed the 64-bit version this time. *** Thanks!
-
Can AfxFrameOrView100 Be Controlled?
muchado replied to muchado's topic in AutoIt General Help and Support
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... -
Can AfxFrameOrView100 Be Controlled?
muchado replied to muchado's topic in AutoIt General Help and Support
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 -
Can AfxFrameOrView100 Be Controlled?
muchado replied to muchado's topic in AutoIt General Help and Support
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? -
Can AfxFrameOrView100 Be Controlled?
muchado replied to muchado's topic in AutoIt General Help and Support
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... -
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.