Valiante Posted March 27, 2006 Share Posted March 27, 2006 AutoIt v3 Active Window Info displays the following (among other stuff);>>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: X: 0 Y: 940 W: 1280 H: 18 Control ID: 59393 ClassNameNN: msctls_statusbar321 Text: Style: 0x5400014E ExStyle: 0x00000000 >>>>>>>>>>> Status Bar Text <<<<<<<<<<< (1): Press to display selected entry (2): JOLLEM (3): (4): (5): NUM (6): (7): 27/03/2006However when using the following code, nothing is returned;AutoItSetOption("WinTitleMatchMode", 2) $x = StatusbarGetText("Touchpaper HelpDesk", "", 2) MsgBox(0, "Status bar says:", $x)I'm trying to return the username (JOLLEM) in Touchpaper. How come the window spy sees it, but StatusbarGetText doesn't? Link to comment Share on other sites More sharing options...
nfwu Posted March 27, 2006 Share Posted March 27, 2006 This may help:Some programs use their own status bars or special versions of the MS common control which StatusbarGetText cannot read. For example, StatusbarText does not work on the program TextPad; however, the first region of TextPad's status bar can be read using ControlGetText("TextPad", "", "HSStatusBar1")StatusbarGetText can work on windows that are minimized or even hidden.#) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 27, 2006 Moderators Share Posted March 27, 2006 Well, my first question: Is this a standard Microsoft window? Then, since StatusBarGetText() isn't working... Have you tried: ControlGetText('Touchpaper HelpDesk', '', 'msctls_statusbar321')? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
GaryFrost Posted March 27, 2006 Share Posted March 27, 2006 That is a standard status bar (msctls_statusbar321) Another thing to try might bet the GuiStatusBar Management in the beta, 1st you would get the handle to the control i.e. #include <GuiStatusBar.au3> $handle = ControlGetHandle('Touchpaper HelpDesk' "", "msctls_statusbar321") MsgBox(0,"Get Text?",_GuiCtrlStatusBarGetText ($handle , 1) SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
nfwu Posted March 27, 2006 Share Posted March 27, 2006 (edited) @gafrost: 2 Syntax errors in your example You missed a bracket in the last line. EDIT: Also a , in the second line. Fixed:#include <GuiStatusBar.au3> $handle = ControlGetHandle('Touchpaper HelpDesk', "", "msctls_statusbar321") MsgBox(0,"Get Text?",_GuiCtrlStatusBarGetText ($handle , 1)) Edited March 27, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
GaryFrost Posted March 27, 2006 Share Posted March 27, 2006 @gafrost: 2 Syntax errors in your example You missed a bracket in the last line. EDIT: Also a , in the second line. Fixed:#include <GuiStatusBar.au3> $handle = ControlGetHandle('Touchpaper HelpDesk', "", "msctls_statusbar321") MsgBox(0,"Get Text?",_GuiCtrlStatusBarGetText ($handle , 1)) It happens, drinking 1st cup of coffee and haven't even put my glasses on yet SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
Valiante Posted March 27, 2006 Author Share Posted March 27, 2006 (edited) Hi guys - WOW the response is overwhelming! nfwu & SmOke_N: Yeah, as gafrost said this is a standard status bar control, but nevertheless I did try playing around with the ControlGetText function but to no avail (mainly as this only returns the first object in that control and I need the second).gafrost: Thanks for the info, however it'll take me some time to play around with and test the code as I've only just today downloaded version 3.1.1 (and the 115 beta release) in an effort to try to fix my problem, so as yet I'm not that familiar with the new GUI concepts.I'll have a go, but do you think it will work considering it utilises the ControlGetText function which (as before) only returns the first object?Regardless of the outcome, thank you all so much for your help!!**EDIT** Sorry, I didn't read it properly - I see now it's ControlGetHandle, not Text. Ignore that line! Edited March 27, 2006 by Valiante Link to comment Share on other sites More sharing options...
Valiante Posted March 27, 2006 Author Share Posted March 27, 2006 Well not much playing around was needed after all, I see now that the code you provided was a complete script. However, unfortunately it still returns a blank result. I would give up, but the fact that the Window Spy and see the text makes me think there must be a way to return it in code! Any other ideas? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 27, 2006 Moderators Share Posted March 27, 2006 You may try this: http://www.autoitscript.com/forum/index.ph...topic=14323&hl=I'm just throwing stabs out there... Also, you say window spy, have you used the AutoInfo.exe tool? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valiante Posted March 27, 2006 Author Share Posted March 27, 2006 Sorry, yeah - it used to be called "AutoIt Window Spy" in the previous version (which I'm more used to). I see now that it's "AutoIt Window Info", but essentially the same thing. Link to comment Share on other sites More sharing options...
Valiante Posted March 27, 2006 Author Share Posted March 27, 2006 SmOke_N, I'm sorry - I just can't get my head around that, I'm simply not advanced enough.I tried downloading the include and example then amended the example to my needs, but it just kept returning an error. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 27, 2006 Moderators Share Posted March 27, 2006 Surely wish I could help more... what program are you trying to automate, maybe someone has already done it? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valiante Posted March 27, 2006 Author Share Posted March 27, 2006 It's called Touchpaper HelpDesk, an IT call-logging tool. 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