Jump to content

How to disable RED highlight for UIA automation


Recommended Posts

This is my third week learning to use Lars and Junkew's UIAspy UDF.  As many may know there is a red highlight getting drawn around controls and dialog boxes.  I have looked at the UIA.CFG file and have changed the Highlight to false, but the red highlights are still being drawn.  How do I disable the red highlight from getting drawn during UIA testing?  I am running the latest AutoIT version from download section with Windows 10 Enterprise 1909 when testing with Lars and Junkew's UIA UDF.  Thank you.

P.S. I am aware the misplaced red highlights are due to Windows scaling, but that is not my concern for this post.  I just want to disable the red highlight. Edit: I have also set SUT settings for my application(s) in the CFG file (just not shown in this example).

; This is an inifile for UIA wrappers having the configuration defaults
; Debug=true        Turn debugging on of off with true/false value
; Highlight=true    Turn Highlighting rectangle to true / false
; TODO: AutoStartSUT=true AutoStartSUT is starting all SUT's automatically

[Global]
Debug=true
Debug.file=true
Highlight=false
AutoStartSUT=false

[Multiuser]
CFGPerUser=false

[Folders]
subfolders=false

;System under test settings
; Folder      = Location where exe can be found
; Workingdir  = Location of the working directory
; exe         = Name of the exe to start
; Fullname    = Path & name of exe
; Windowstate = minimized, maximized, normal

[SUT1]
Folder=%Windowsdir%\system32
Workingdir=%Windowsdir%\system32
exe=calc.exe
Fullname=%Windowsdir%\system32\calc.exe
Parameters=
Processname=calc.exe
Windowstate=normal

[SUT2]
Folder=%Windowsdir%\system32
Workingdir=%Windowsdir%\system32
exe=notepad.exe
Fullname=%Windowsdir%\system32\notepad.exe
Parameters=
Processname=notepad.exe
Windowstate=normal

[SUT3]
C:\Program Files (x86)
Folder=%programfilesdir%\Microsoft Office\Office14
Workingdir=%programfilesdir%\Microsoft Office\Office14
exe=winword.exe
Fullname=%programfilesdir%\Microsoft Office\Office14\winword.exe
Parameters=
Processname=winword.exe
Windowstate=normal

 

Edited by LisHawj
Link to comment
Share on other sites

hi friend i try to resolve this problem i download a last version of UI  but return me this error like  if i dont have the  file

: error: can't open include file "..\UIA_Constants.au3".

you have  this UIA_Constants.au3,can you share ??

and  if  you want spy app why you dont  use au3info??

thankz bye

Link to comment
Share on other sites

6 hours ago, faustf said:

if  you want spy app why you dont  use au3info??

They detect different kinds of controls, au3info doesn't detect all.

I believe UIA_Constants.au3 is included in the udf. Check my sig.

Edited by careca
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

On 4/24/2020 at 3:47 PM, faustf said:

hi friend i try to resolve this problem i download a last version of UI  but return me this error like  if i dont have the  file

: error: can't open include file "..\UIA_Constants.au3".

you have  this UIA_Constants.au3,can you share ??

and  if  you want spy app why you dont  use au3info??

thankz bye

The UDF file you're missing is part of Larsj's UIAspy UDF located at https://www.autoitscript.com/forum/topic/201683-ui-automation-udfs/.  Au3info cannot detect the controls I wish to automate, so I am using UIA automation from Junkew and Larsj.

Link to comment
Share on other sites

  • 1 month later...

You probably solved / gave up on this some time ago, but your question helped me solve it, so I'll share in case anyone else wants to turn those annoying red highlights off.

Find and edit the function _UIA_DrawRect, it's enough to just include "return" at the first lane. (it's around line 2078 if I didn't do too many edits before that).

Link to comment
Share on other sites

  • 2 years later...

For those who didn't understand Err's post, that file is "UIAWrappers.au3"

On 6/15/2020 at 12:47 PM, ERR_NAME_NOT_RESOLVED said:

You probably solved / gave up on this some time ago, but your question helped me solve it, so I'll share in case anyone else wants to turn those annoying red highlights off.

Find and edit the function _UIA_DrawRect, it's enough to just include "return" at the first lane. (it's around line 2078 if I didn't do too many edits before that).

Immediately return to main when the function is called: Add "return" to the function at the top, effectively short circuiting it's execution. I have tested this solution

Link to comment
Share on other sites

  • 1 year later...
On 6/15/2020 at 6:47 PM, ERR_NAME_NOT_RESOLVED said:

You probably solved / gave up on this some time ago, but your question helped me solve it, so I'll share in case anyone else wants to turn those annoying red highlights off.

Find and edit the function _UIA_DrawRect, it's enough to just include "return" at the first lane. (it's around line 2078 if I didn't do too many edits before that).

return is working fine , also you can change the color if you want :

 

Func _UIA_DrawRect($tLeft, $tRight, $tTop, $tBottom, $color =0x08B79D, $PenWidth = 4)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...