Jump to content

raoul

Members
  • Posts

    6
  • Joined

  • Last visited

raoul's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Yes, it is definitely a .NET control. I made it myself as a test bed for checkbox controls using VS.2010 .NET. So, AutoIt doesn't work completely with .NET controls. That is unfortunate as more-and-more applications are written in .NET, so this will become a major issue. I have searched the forums and found posts where people are running into the same problem, but I haven't found a solution yet. *sigh* I am not sure where to go next on this problem. I have even contemplated examining the pixels at the checkbox location to see if it is checked or not, but it doesn't seem very robust. There has to be a solution, but it might not be through AutoIt unfortunately.
  2. Thanks guys for trying to help me through this. It I hardcoded it just for this example. I have tried to access it using ClassnameNN and even the hWnd, but it behaves the same. i am 100% certain that I am accessing it correctly using the controlID, because I can use the same ControlCommand using "IsVisible" and it works perfectly. That is, i made a button on the test application that makes it visible or not, and the ControlCommand gets it right every time. Au3Info shows: WindowsForms10.BUTTON.app.0.2bf8098_r20_ad14
  3. It is as standard as it can be. I made the test application myself and all I did was drag a standard checkbox on to the form. No frills...
  4. Thanks Zedna for the response. I don't think the AutoitX part matters. I was thinking about moving the question out to the general help and questions forum, as if someone can show me an example of it working, then I will worry about the autoitX part. Anyway, I tried your suggestion, and it still does the same thing. For whatever reason, the checked state of checkboxes and radiobuttons doesn't seem to be easily accessible anymore. I think it will work on older applications, but anything written in the last few years in .NET doesn't seem to work. As a test, i made a simple application which has nothing but a checkbox on it. I can see if the checkbox is visible or not, so I seem to be interacting with it ok. However, i cannot query if it is checked or not. If someone can give me a line of script that does this (even if not autoitX) I would very much appreciate it!!! My sub that does NOT work trying ControlCommand Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim state As Integer = Nothing Dim formname As String = "TestFormName" AutoIt.WinActivate(formname) state = AutoIt.ControlCommand(formname, "", 1115520, "IsChecked", "") MessageBox.Show(CStr(state)) End Sub
  5. Any thoughts on this? I have been working very hard on this, but not able to come up with a solution yet. I have been using some basic window API calls, that I assume AutoIt is doing in the background. For some reason, the ID of the checkbox seems to change. However, I have been able to call functions from the User32.lib like FindWindow and FindWindowEx and get the proper handle of the control. Then I am able to use Sendmessage(hWnd,BM_click,0,0) to click on the checkboxes and radiobuttons just fine. However, when I try to use sendmessage(hWnd,BM_GetCheck,0,0) to see if they are checked or not, it fails and always returns 0. Searching around the net, this appears to be a common thing since they moved on to the latest versions of .NET. Now you are recommended to use Iaccessible to interact with these controls. However, I have not been successful in working out how to do it, so I am still hoping there is a way to do it in AutoIt and someone will show me how. -R
  6. I have been working with AutoItX for a while now. I needed to write a program in VB.NET that would interact with multiple other windows programs. So far, I have had no trouble working with the various controls - getting / setting text from textboxes, clicking buttons, moving sliders, etc. I thought I was about finished and the last things I have to do is be able to interact with checkboxes (and radiobuttons). I thought it would be fairly straightforward, but I haven't been able to figure it out, and searching around this forum hasn't solved it for me yet. I would appreciate any help that I can get. I figure this must be a standard thing to want to do, so I must be missing something. What I thought I needed to do was a command like Dim state As Integer state = AutoIt.ControlTreeView(MainName, "", 1073, "IsChecked", "", "") and then just evaluate state to see if it is a -1,0,1. This doesn't seem to do anything though. MainName is the title of the form and the checkbox handle is 1073. I am not sure about putting the extra1 and extra2 as "", "" - but it gives me a syntax error if I don't put something for the optional extras. I must be missing something. I thought I should be able to toggle the state by using the following to click on it (just like a button), but it doesn't do anything either. AutoIt.ControlClick(MainNameThermoTrak, "", 1073) So, the last things I need to work out is how to check the state of checkboxes and radiobuttons in a different windows application, and how to check / uncheck them. On a side question: From what I can tell, the AutoItX.dll doesn't have the fully library of controls in it. Is there a way to add them and gain the full functionality of the AutoIt library when using the DLL inside a vb.net program?
×
×
  • Create New...