behdadsoft Posted March 30, 2021 Share Posted March 30, 2021 (edited) Hi. I run a setup file and want when progress percentage is equal to 50, show me a message. I searched in forum and found some code that didn't work. I wrote this code and my problem is GUICtrlRead() only work with autoit controls. I need a solution for read value form outside controls. dose anyone know how can fix this problem? #RequireAdmin #NoTrayIcon ;local variables Local Const $title = "Setup" Local $setup = @ScriptDir & "\mysetup.exe" ; run Setup file Run($setup, "", @SW_HIDE) While 1 local $hwnd = WinWaitActive($title) local $gethandle = ControlGetHandle($hwnd, "", "[CLASS:ProgressBar; INSTANCE:1]") local $precent = GUICtrlRead($gethandle) ConsoleWrite("Precent is: " & $precent & @CRLF) WEnd Exit Edited March 30, 2021 by behdadsoft Link to comment Share on other sites More sharing options...
crackdonalds Posted March 31, 2021 Share Posted March 31, 2021 it would be easier if you could extract the files from mysetup.exe and install them with your autoit script by using fileinstall. depending on the type of installer you can find out exactly what it does and let your script do it instead. Then you will be able to make your own progressbar and monitor it from within your own script. I'm afraid it's not possible the way you would like it. A way that I could think of would be to use imagesearch and monitor the progress bar by color checking the progress bar itself (pixel searching). Link to comment Share on other sites More sharing options...
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