I have a problem to handle the controls of an application.
Using AutoIT Windows Tool I can get only the Window (see Summary of the picture).
Any tips to get the controls without knowing the name?
(PS Using TestStack.White everything works, however I want the HIDE application feature of AutoIT).
I'm using WinMenuSelectItem() successfully in the application I'm automating but i'm looking for another feature.
I use WinMenuSelectItem to Process a record.
I then need to use WinMenuSelectItem to Save the record, but I shouldn't save before the Process step above finishes (Save option is always enabled).
Sadly, the only way to know if Processing actually finished is when another menu item gets enabled (but I don't want to select that other menu item, just wait until it's enabled)
The AU3Info tool doesn't show me anything for the menu bar items so I can't use ControlCommand IsEnabled.
Anybody have other ideas?
Quick example using SciTE menu bar as they act the same, AU3Info can't see those menu items either.
;Undo in SciTE, then wait until Redo is enabled but dont click it. If WinMenuSelectItem("[CLASS:SciTEWindow]", "", "&Edit", "&Undo") Then ConsoleWrite("Undo clicked" & @CRLF) ;How to I know if "&Edit", "&Redo" is enabled? Else ConsoleWrite("Can't find Undo" & @CRLF) EndIf ;Erase this line then run/F5 to get back
I see couple of ways to import module , one with specifying absolute path of the file to get imported, by this logic i believe to import a specific module will be like #include <c:\modulepath\duplicatemodule.au3>
but i see some registry changes also made in this link , can someone explain why that registry change is really required.
I am trying to execute a exe file in auto it as elevated previlage , but not successful till now . below are the methods i tried till now.
Disabled UAC access from windows and selected run only as administrator from executable properties. i logged in as administrator but still exe needs to launch as run as administrator.
Used Below methods from forum still no luck. anything i missing? i tried to use powershell.ps1 intead of exe as well.
1. Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, $RUN_LOGON_NOPROFILE, "c:\Exec.exe", "", @SW_SHOWMAXIMIZED)
2. RunWait("C:\Automation\TestScripts\Writefilter.exe", @WindowsDir, @SW_MAXIMIZE) - Std out error
This command gives out put as running with admin rights
#include <MsgBoxConstants.au3> #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #RequireAdmin Example() Func Example() ; Change the username and password to the appropriate values for your system. Local $sUserName = "Admin" Local $sPassword = "PASSWORD" Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, 0, "noetpad.exe", "", @SW_SHOWMAXIMIZED) ; Run Notepad with the window maximized. Notepad is run under the user previously specified. ;~ RunWait(@WindowsDir & "C:\automation\TestScripts\Writefilter.exe", @WindowsDir, @SW_MAXIMIZE) EndFunc
I have below code which execute well when all prerequisite met, when window pop up is not available its throwing an error. i want to capture error instead of error out.
error handling added in the code to capture it but it does not work still giving me error saying Variable must be of type "Object".
$oCurWin.FindAll($treescope_subtree, $oCondition, $pElements)
How to catch error properly .