snaileater Posted July 19, 2010 Share Posted July 19, 2010 (edited) Hi,i try to get the text of a status bar in an external application. AutoIt Window Info gives me the handle of that status bar, but it has not controlID. My problem is that i am not able to get this handle programmaticaly. i tried a few things (like ControlGetHandle("Gestion de la GEOBASE V3.1.0","","[CLASS: StatusBarWndClass; INSTANCE: 1]")) but none worked ...Here is a screenshot of the application ... how should i retrieve that handle ?When i try a "WinGetClassList" on that window here is what i get :ToolbarWndClass ToolbarWindow32 MDIClient ThunderRT6FormDC ThunderRT6CheckBox ThunderRT6TextBox ThunderRT6CommandButton ThunderRT6TextBox ThunderRT6CommandButton ThunderRT6CommandButton StatusBarWndClass AfxOleControl42uThanks for ur help ! Edited July 19, 2010 by snaileater Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 19, 2010 Moderators Share Posted July 19, 2010 snaileater,You do not need the handle, you can use the CLASS and INSTANCE directly. Assuming that the Window Info tool can see the text in the status bar, try this:ControlGetText("Gestion de la GEOBASE V3.1.0", "", "[CLASS: StatusBarWndClass; INSTANCE: 1]")M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
snaileater Posted July 19, 2010 Author Share Posted July 19, 2010 (edited) snaileater, You do not need the handle, you can use the CLASS and INSTANCE directly. Assuming that the Window Info tool can see the text in the status bar, try this: ControlGetText("Gestion de la GEOBASE V3.1.0", "", "[CLASS: StatusBarWndClass; INSTANCE: 1]") M23 Melba, i already tried ControlGetText("Gestion de la GEOBASE V3.1.0", "", "[CLASS: StatusBarWndClass; INSTANCE: 1]") but for some reasons i don't understand it didn't work... With the handle given by AutoIt Window Info i can set the Text in that status bar and when set by me i can read the content with things like : $var = _GUICtrlStatusBar_GetText ($Handle,1) but when the content is set by the external application it seems i can't reach the content ... At least i really would like to get the Handle of the status bar ... Edited July 19, 2010 by snaileater Link to comment Share on other sites More sharing options...
snaileater Posted July 19, 2010 Author Share Posted July 19, 2010 (edited) Melba,The AutoIt Window Info doesn't give me the text of the status bar that's right (but just the handle of the status bar) ... but knowing that i would simply like to find a way to get an handle to the status bar so that i could modify the content by myself ... Edited July 19, 2010 by snaileater Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 19, 2010 Moderators Share Posted July 19, 2010 snaileater, Sorry about the delay, the Tour de France is more important! Have you looked at Ascendant's EnumChildWindows UDF to see if it can help? Other than that I am out of ideas, sorry. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
snaileater Posted July 20, 2010 Author Share Posted July 20, 2010 snaileater, Sorry about the delay, the Tour de France is more important! Have you looked at Ascendant's EnumChildWindows UDF to see if it can help? Other than that I am out of ideas, sorry. M23 Melba23, EnumChildWindows does the job, thanks ... I will have to have a deeper look in this script to understand why i wasn't able to reach the StatusBar Handle ... Sorry for bothering u during the Tour de France ... Link to comment Share on other sites More sharing options...
JohnOne Posted July 20, 2010 Share Posted July 20, 2010 This may seem a little foolish, but does not the the native StatusbarGetText() function work? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 20, 2010 Moderators Share Posted July 20, 2010 JohnOne,I had thought of that, but as the Help file says:This functions attempts to read the first standard status bar on a window (Microsoft common control: msctls_statusbar32). Some programs use their own status bars or special versions of the MS common control which StatusbarGetText cannot read. and snaileater's status bar appears to be StatusBarWndClass, I thought it not worth pursuing. But perhaps snaileater could try it and see! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JohnOne Posted July 20, 2010 Share Posted July 20, 2010 I see, thanks for the heads up M23. Snaileater may be interested to know that a nice juicy snail named Sidney recently won a world championship race of 13 inches in a stunning time of 3 minutes 41 seconds according to yesterdays newspapers. MMmmmm snails http://www.telegraph.co.uk/news/newstopics/howaboutthat/7897863/Sidney-the-snail-races-to-victory-in-world-championships.html AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
snaileater Posted July 22, 2010 Author Share Posted July 22, 2010 I see, thanks for the heads up M23.Snaileater may be interested to know that a nice juicy snail named Sidney recently won a world championship race of 13 inches in a stunning time of 3 minutes 41 seconds according to yesterdays newspapers.MMmmmm snailshttp://www.telegraph.co.uk/news/newstopics/howaboutthat/7897863/Sidney-the-snail-races-to-victory-in-world-championships.htmlSad thing that (like in the Tour de France) some snails use prohibited stuff to improve performances ... 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