Thrain Posted February 9, 2006 Share Posted February 9, 2006 Hello! I have been using VB.net for some task automation, however I recently found this great website and am considering using AutoIT instead or in addition to my current vb work. Anyways... I have been trying to use VB.net to grab the current "status bar" text of a window. I have tried and failed. Now, with using AutoIT v3 Active Window Info tool (great tool btw!) I see the following: >>>>>>>>>>> Status Bar Text <<<<<<<<<<< (1): Ready (2): -----THE STATUS BAR TEXT THAT I NEED!!!!!!----- (3): (4): NUM (5): As you can see, the statusbar that I need to read is actually listed under (2), which I found quite strange. Now, assuming I am a total AutoIT noob but am pretty good with vb.net, what should I do? Is there an easy way to incorporate the autoIT with my current vb.net project? Or, is there a way of getting this info with vb.net that somewhat I have overlooked? I have spent ALOT of time buired in spy++ and have yet to grab the info. Yet, the SECOND I try AutoIT v3 Active Window Info, I see the status bar text immedately. All help is greatly appreciated, thx! Link to comment Share on other sites More sharing options...
greenmachine Posted February 9, 2006 Share Posted February 9, 2006 I believe AutoItX allows usage of AutoIt functions in other programming languages. As for the status bar, I think the status bar can be broken up into sections (1 - 6), and each section has a bit of text and/or images in it. That's why your text might be in 2 instead of 1. If the status bar you're trying to work with is in IE, you can look at DaleHolm's IE.au3 here: http://www.autoitscript.com/forum/index.php?showtopic=13398If it is not IE, but has a COM object associated with it, you can use ObjCreate to make an instance of the object, and automate from there. Link to comment Share on other sites More sharing options...
Thrain Posted February 9, 2006 Author Share Posted February 9, 2006 Thanks greenmachine! The statusbar is not with IE unfortunately, however I will certainly look into the object creation. I am new to status bar reading/manipulation so your explanation of the different sections certainly helps. thx Link to comment Share on other sites More sharing options...
tonedeaf Posted February 9, 2006 Share Posted February 9, 2006 @Thrain I have been trying to use VB.net to grab the current "status bar" text of a window. I have tried and failedYou can easily read the status bar text in AutoIt. Look up this function in the help file (in latest beta version) _GuiCtrlStatusBarGetText($h_StatusBar[,$i_Panel=0]) Link to comment Share on other sites More sharing options...
Thrain Posted February 9, 2006 Author Share Posted February 9, 2006 @Thrain You can easily read the status bar text in AutoIt. Look up this function in the help file (in latest beta version) _GuiCtrlStatusBarGetText($h_StatusBar[,$i_Panel=0]) now, my entire project is already coded in vb.net. Is it easy enough to incorporate the AutoIT into my visual studio project? Assuming I will be deploying this application on multiple computers, are there additional files I will need to include? thank you! Link to comment Share on other sites More sharing options...
Thrain Posted February 9, 2006 Author Share Posted February 9, 2006 sorry for the dumb question. For anyone else: If you install AutoITx entirely you can already use its functionality through COM (probably...) If you have not installed it entirely, and wish to sue a COM interface, then simply do the following: 1. Open a command prompt 2. Change directory to the directory that contains AutoItX3.dll 3. Type regsvr32.exe AutoItX3.dll and press enter This will permanently register the DLL so you can use it. Now, in my Visual Studio 2k5 ~ VB.net project. All I need to do is type the following into a form in order to use AutoIT to open notepad: Dim oAutoIt = CreateObject("AutoItX3.Control") oAutoIt.Run("notepad.exe") pretty freaken cool! hope this helps someone else! 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