tickling Posted September 23, 2008 Share Posted September 23, 2008 Hello I am automating some chore. The chore would show a progressbar that was not there before it started, and will make the progressbar vanish when it is done. I need to know what is happening in my autoit script, so I found the handle of that progressbar after the first time it appears. However I could not find a way to check if it is visible or not, and could not find a way to check the actual progress value. Any ideas on how to do this ? Thanks !! Link to comment Share on other sites More sharing options...
Andreik Posted September 23, 2008 Share Posted September 23, 2008 HelloI am automating some chore. The chore would show a progressbar that was not there before it started, and will make the progressbar vanish when it is done. I need to know what is happening in my autoit script, so I found the handle of that progressbar after the first time it appears. However I could not find a way to check if it is visible or not, and could not find a way to check the actual progress value. Any ideas on how to do this ? Thanks !!You can read a progress with GUICtrlRead(). When the words fail... music speaks. Link to comment Share on other sites More sharing options...
tickling Posted September 23, 2008 Author Share Posted September 23, 2008 Thanks I tried that, all I get is 0's Here is my code, perhaps anyone can help out here $i = 0 do sleep(1000) WinActivate("Export") $tmp1 = ControlGetHandle( "Export","","[CLASS:ProgressBarWndClass; INSTANCE:1]") $tmp = $tmp & " " & GUICtrlRead("[CLASS:ProgressBarWndClass; INSTANCE:1]") $i = $i + 1 until GUICtrlRead("[CLASS:ProgressBarWndClass; INSTANCE:1]") == 100 or $i > 20 msgbox(1,"done ! ", $wlarray[$wlindex] & " to " & $mspath & " tmp = " & $tmp & " handle = " & $tmp1 &" i = " & $i) The progress bar handle is identified correctly ($tmp1). However GUICtrlRead returns 0 all the time. I suspected that GUICtrlRead does not identify the progress bar. I tried to identify the progress bar with ClassNN and it gave the same results. When I run Autoit Window Information it does not give me anything for ID. Any idea ? Thanks ! Link to comment Share on other sites More sharing options...
tickling Posted September 23, 2008 Author Share Posted September 23, 2008 I tried GUICtrlGetHandle and this one also failed to recognize the progress bar. However as I said, ControlGetHandle recogized it correctly (and got its handle). Both used the same ControlID string. Any idea why is that ? It seems that the GUIxxx functions fail to identify controls that the ControlXXX functions do identify. Any help will be appreciated, all my hair turned white by now, could find nothing relevant in the forum or documentation Thanks ! Link to comment Share on other sites More sharing options...
Zedna Posted September 23, 2008 Share Posted September 23, 2008 Use SendMessage with PBM_GETPOSHere is link to simple example: http://www.autoitscript.com/forum/index.ph...st&p=532631 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
tickling Posted September 23, 2008 Author Share Posted September 23, 2008 Thanks much, Zedna ! It worked ! Link to comment Share on other sites More sharing options...
Keat Posted July 11 Share Posted July 11 Hello How the problem solved.? I am on RobotFramwork with AutoItLibrary, there is no GUICtrlRead Key word Link to comment Share on other sites More sharing options...
Developers Jos Posted July 11 Developers Share Posted July 11 1 hour ago, Keat said: Hello How the problem solved.? You do realize this was 15 years ago? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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