briang Posted April 7, 2017 Posted April 7, 2017 Using AutoIt 3.3.14.2 to start Entrust etunprot.exe application. The Entrust GUI application starts and displays, but does not have focus. The application is in the foreground, but the title bar is greyed indicating it is not in focus. After the application starts the AutoIt script is supposed to enter the password, but doesn't because of no focus. When I click on the application to give it focus then the script continues, password is entered and finishes successfully. I originally used WinWaitActive and replaced it with WinWait and WinActivate to try and fix the problem. Here is the code: ; Terminate script if no command-line arguments If $CmdLine[0] = 0 Then Exit (1) Run("C:\Program Files\Entrust\Password Unprotect\etunprot.exe " & $CmdLine[1]) WinWait("Entrust Password Unprotect", "OK") WinActivate("Entrust Password Unprotect", "OK") ; Enter the password text Send("password") ; Submit the password Send("{ENTER}") WinWait("Entrust Password Unprotect", "Enter name of output folder") WinActivate("Entrust Password Unprotect", "Enter name of output folder") ; Enter the name of the output folder Send($CmdLine[2]) ; Unprotect the enp file Send("{ENTER}")
spudw2k Posted April 10, 2017 Posted April 10, 2017 I am not familiar with the application, but you may look to see if it uses input controls which can be directly sent messages instead of just automating keyboard, key strokes. Try using the AutoIt Window Info Tool (Au3Info) included with AutoIt to see what controls are in use by the GUI. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Floops Posted April 11, 2017 Posted April 11, 2017 Have you tried ControlSend ? That way the window doesn't have to be focused.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now