Recently Browsing 0 members
No registered users viewing this page.
Help Needed: UIAWrappers.au3 error in access controls in 2'nd run of the app within the same script (even no errors in 1'st run)By Sayed
I'm new in AutoIt forms and using AutoIt to automate desktop application (able to automate the application normally but facing issue when I've to re-run the application twice within the same script...so need help in this please)
here is the steps then followed by the issue in a brief :
1- run application .
2- do some actions (click menus,activate windows,set texts..)
3- close the application.
4- run the application again & access the same controls.
5- open the same windows again (like step 2)
6- perform some validations (by getting texts from some text boxes)
7- close the application again (and repeat 1-7 for 15 times in average )
* all controls are accessible in the first run and actions done successfully on controls (for steps 1-3) BUT from the second run of the application from step-4 it's able to set focus only the main application window.
Note: only unique properties used to while mapping the controls.
Error that appear in the console :
UIAWrappers.au3" (1673) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $x = Int($t + ($t / 2)) $x = Int($t + (^ ERROR
Simple spy code of one of the controls that has this strange issue(menubar&view menu Item):
;~ *** Standard code maintainable *** #include "UIAWrappers.au3" AutoItSetOption("MustDeclareVars", 1) _UIA_setVar("oP1","Title:=XXX;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app") ;main app form xxx _UIA_setVar("oP2","Title:=menuStrip1;controltype:=UIA_MenuBarControlTypeId;class:=WindowsForms10.Window.8.app") ;menuStrip1 ;~ $oUIElement=_UIA_getObjectByFindAll("View.mainwindow", "title:=View;ControlType:=UIA_MenuItemControlTypeId", $treescope_subtree) _UIA_setVar("oUIElement","Title:=View;controltype:=UIA_MenuItemControlTypeId;class:=") ;ControlType:=UIA_MenuItemControlTypeId;classname:=") ;~ Actions split away from logical/technical definition above can come from configfiles ;~_UIA_Action("oP1","highlight") _UIA_Action("oP1","setfocus") ;~_UIA_Action("oP2","highlight") _UIA_Action("oP2","setfocus") _UIA_action("oUIElement","highlight") ;~_UIA_action("oUIElement","click")
I got a questions, I maintain code in autoIT and every time I compile a new version or modification, Scite generate 2 folders. One folder is finish by released and the other is tentative. I try to make some google search, but never find answer would satisfied myself. The dev who was maintain it before were using AutoIt3Wrapper_GUI, and I don't know if it's related. I look both folder, but they seem pretty identical, but I would like to know what it's the difference between those to folder. Anyone have a clue?
I don't have any experience compiling AutoIt scripts or know of any best practices regarding said scripts so I was wondering, what are some of the options for passing data to complied scripts? Here's an example of what I mean by "option": Writing data to a text file, then running a script which reads the data from that text file.
I apologize if this topic is a little lackluster
Is it possible to compile script without any icon resources included?
When I make exe it uses default system icon of current OS even if I compile as console application.
On other versions of Windows it looks a little strange
It seems that the only way is remove icons from exe after compilation using resource editors like ResHacker.
another bad solution:
Using corrupted 35 bytes icon file. Windows can't load it and shows default system icon.
#pragma compile(Icon, broken.ico) broken.ico